[jcifs] Re: Maximum message size
Christopher R. Hertel
crh at nts.umn.edu
Sun Oct 6 05:43:36 EST 2002
"Michael B. Allen" wrote:
> No. WordCount doesn't include the ByteCount field. So 12 is right.
Yeah. Urban caught that too. I should know better.
It sill leaves the question... if the maximum data size is 65535, then
what is the MaxCountHigh for? There's no reason to use more than 16 bits
if 64K is the limit.
Also, the SMB_COM_WRITE_ANDX request has a DataLengthHigh field (which is
a USHORT, by the way...geez):
USHORT DataLengthHigh; High 16 bits of data length if
CAP_LARGE_WRITEX; else MUST BE ZERO
Once again, that suggests that you could send a write of more than 64K.
The thing is, the SMB_COM_WRITE_ANDX response does *not* have an extension
field according to the docs:
USHORT Count; Number of bytes written
So the server can only report up to 64K written. There's no way to report
that more than 64K were written unless one of the Reserved fields is
actually the upper 16 bits of the Count.
I hate this. :^l
When I looked at the jCIFS code I did not find the
SMB_COM_READ_ANDX.MaxCountHigh field defined.
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs