Large Write_Andx messages

Mikael Klamra mklamra at gmail.com
Sun Oct 28 12:25:34 GMT 2007


Hi,
I'm implementing a CIFS client. I have some problems with WRITE_ANDX
messages that I hope someone can help me with. The negotiated maximum
buffer size between the client and the server (a Windows Server 2003
R2) is 4356 bytes. I have set the CAP_LARGE_WRITEX and CAP_LARGE_READX
bits in the client's capabilities, which means that a WRITE_ANDX
message from the client can be up to 64 KB. However, I get
a non-specific error (ERRSRV/ERRerror) back from the server when I try
to send a WRITE_ANDX message with two or more blocks when the total
message size is about 4700 bytes or greater. It works without problems
when the message size is small. Are there any obscure rules for
WRITE_ANDX messages, such as padding rules? I've aligned the data
buffer of each block to the nearest 4-byte boundary. Do I have to
align the beginning of each block too? I'm using the 12-byte WordCount
version of WRITE_ANDX.

I have tried to sniff similar messages between Windows XP and Windows
Server 2003 R2, but Windows does not seem to put several blocks in
WRITE_ANDX messages. Does Samba use WRITE_ANDX messages with several
blocks? If yes, how are the messages structured?

Regards,
Mikael Klamra


More information about the samba-technical mailing list