Extension to Samba IDL.

Elrond elrond at samba.org
Mon Jun 19 15:56:05 GMT 2000

Hehe... When I talked with Matty and Luke about extensions,
everyone told me, that those are a bad idea, and everyone
told me, it's always better to keep with msidl on that...
After a while, I saw, that most stuff could be done with it
(and other could be done with some tricky attributes, I
learned later about)

hehe... and now everybody is pro samba-specific

Okay, some comments follow:

On Sat, Jun 17, 2000 at 07:59:29AM +1000, Christopher R. Hertel wrote:
> All I need is the go-ahead on what I proposed.

I've no probs with extensions, I wanted some too. And got
told, it's a bad idea... after some long discussion, I got
a little pissed and just stopped the discussion and went
doing other stuff. ;)

> Some quick notes:
> 1) When using bitfields, we will have to be careful with alignment.  A two
>    bit field with no following padding or alignment specified will shift the
>    rest of the packet.  By default, I think that we should force any
>    non-bitfield value to start on a byte boundary.

Yep. Having bytes and other stuff not even aligned at 8 bit
will make samba extremely slow... So I think, this is the
right way: Aligning non-bitfields at a minimum of 8 bit...

If you realy need a byte, that is not aligned properly, you
should do uint8:8 or somesuch.

> 2) It's not good enough to simply mask a byte or word.  In the example I gave,
>    you either have:
>    [x|x|y|y|y|y|y|y] or
>    [x|x|z|z|z|z|z|z|z|z|z|z|z|z|z|z] depending on the value of xx.
>    So, if you parse it as a uint8 it might turn out that you needed a uint16,
>    and vice versa.

Hmm... that's a run-time issue... not easy, but it should
be doable.


More information about the samba-technical mailing list