triple allocation of large buffers.
jra at samba.org
Fri Jan 18 02:11:48 GMT 2008
On Thu, Jan 17, 2008 at 10:00:24AM +0000, Amin Azez wrote:
> 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?
Not ignoring you, just really busy. I'll talk to Stevef in the
next couple of days and get back to you.
More information about the samba-technical