[jcifs] Re: Maximum message size

Michael B. Allen miallen at eskimo.com
Sun Oct 6 06:16:18 EST 2002

On Sat, 5 Oct 2002 14:43:36 -0500
"Christopher R. Hertel" <crh at nts.umn.edu> wrote:

> "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.

No idea. Never used it. My impression was that you could basically
unhook SMB framing and stream aribitrary amounts of data. Sounds like
that isn't the case or maybe it was the original intention and it just
didn't pan out like just about every other command in CIFS. No surprise.

> 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.
> Chris -)-----
> -- 
> 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

A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and more importantly to tasks that have not
yet been conceived. 

More information about the jcifs mailing list