triple allocation of large buffers.

Amin Azez azez at ufomechanic.net
Thu Jan 17 10:00:24 GMT 2008


Jeremy/Stevef please can I have a trans2 sub-opcode?

* Andrew Bartlett wrote, On 16/01/08 22:16:
> ...
> Not having looked at the code, I wonder if vfs_cifs gets away with a lot
> because the structures and packets being passed along are identical, so
> much less munging is involved.
>   
There's actually a lot of munging as the calls are all mapped to a
generic form, but they all preserve the pointer to the pre-allocated
response (which gets munged back to) so when the proxied read is
received the read-data is unpacked directly to the pre-allocated
response as referenced by a pointer that passed unscathed through a few
layers of munging.

As said to Stefan, I would have to provide storage for an [in,out]
uint8* x; and merely supply the pointer in the rpc struct, so I am sure
something can be done based on that to have the blob unpacked directly
to the pre-allocated response. I'll investigate.
> I'm sorry you seem to be getting the run-around.  This is a new area,
> and trying the different options is I hope worthwhile, in the long term.
> (If frustrating in the short term). 
>   
:-) It needs doing anyway... I'm grateful for the guidance of you guys.
> Perhaps I could make another suggestion:  Put the data in normal CIFS
> packets, but marshal your header with NDR?
>   
I was thinking this last night and Stefan made the same suggestion. The
code in dcerpc.c/dcerpc_ndr_request_send() seems to lend itself to this
idea, so I think that is what I will do.

I've tried to get a sub-opcode from Mr French but not been successful
yet, maybe now I've exhausted alternatives... please guys?

It's used for small payload tid-based rpc-lite.

Sam


More information about the samba-technical mailing list