Large Write_Andx messages
gcolley at apple.com
Fri Nov 2 00:46:00 GMT 2007
Just one note on chaining. I have been chaining NtCreateAndX with
ReadAndX for years without any problem. Now in my case this was done
to read NTFS stream that were small size. Don't ever chain a Close on
the end, it will blue screen the PC.
On Oct 30, 2007, at 12:16 PM, Mikael Klamra wrote:
> Thanks for the tips. I'm giving up on using batched WRITE_ANDX
> messages since it apparently doesn't work properly on Windows.
> I have not confused the CAP_LARGE_* bits and batched messages. They
> are related. My original question concerned how to batch WRITE_ANDX
> messages for Windows servers. Windows Server 2003 seems to have some
> support for this. As I mentioned in an earlier post, I have managed to
> batch two WRITE_ANDX messages and send the batched message to a
> Windows server without errors. However, my experiments show that this
> only works when the total size of the batch message is less than about
> 4700 bytes. When the total size is larger, the server returns an
> error. It thus seems that Windows supports batched WRITE_ANDX
> messages, but only if the total message size is small. The server
> returns an error even if I set the CAP_LARGE_* bits to indicate that I
> want to use messages that are up to 64 KB.
> On Oct 30, 2007 5:43 PM, Michael B Allen <ioplex at gmail.com> wrote:
>> On 10/29/07, Mikael Klamra <mklamra at gmail.com> wrote:
>>> I was asking about chained WRITE_ANDX messages.
>> Hi Mikael,
>> I played around a lot with chaining in the early days. JCIFS can
>> actually chain any messages together to any degree provided that it
>> makes sense to do so. But aside from chaining the
>> SMB_COM_SESSION_SETUP_ANDX with SMB_COM_TREE_CONNECT_ANDX it was
>> all a
>> useless exercise as it was found that Windows servers do not support
>> chaining much at all. There are a few other messages that can be
>> chained but I have never seen more that two messages in a chain work.
>> However, there's a much more compelling reason not to mess around
>> chaining. I follow a general rule when working with MS
>> implementations: Do not do anything you do not see Windows do. The
>> rationale is that MS is not known for third party support through
>> strict conformance to standards and as such your implementation may
>> yield inconsistent results with different server versions. Or support
>> for it could completely disappear in a future version. If you mimic
>> behavior precisely, you know that your implementation will work as
>> long as MS needs to support the implementation you are mimicking. Or,
>> in this particular case, ever worse you could corrupt data on the
>> server trying to chain or pipeline writes.
>> I get a WireShark capture of a Win32 or .NET test program and copy
>> that exactly. Anything else is unsafe.
More information about the samba-technical