SMB_COM_READ_ANDX MaxCount != filesize
Christopher R. Hertel
crh at ubiqx.mn.org
Wed Mar 16 20:12:40 GMT 2005
Hmmm...
So if I understand this correctly, the clients (Windows clients, I
presume) are never asking for as many bytes as they could actually read.
Is the difference consistent? That is, for small files is MaxCount
always, say, 8 bytes less than you'd expect?
My guess is that some parameter in the initial negotiation is off by a
fixed number of bytes. If that guess is correct, it's probably a result
of not counting soe field that un-obviously needs to be counted. SMB
field offsets and such are sometimes a little weird that way.
Chris -)----
On Wed, Mar 16, 2005 at 02:49:35PM -0500, Sailaja Josyula wrote:
> Hi,
>
> I have written my own SMBserver to run as a VFS. I have question
> regarding SMB_COM_READ_ANDX command.
>
> The MaxCount parameter in the command SMB_COM_READ_ANDX is never set to
> the filesize. Even though I am setting
> the End_Of_File parameter correctly in the response to NT_CREATE_ANDX
> command.
>
> In the windows SMB I see that the SMB_COM_READ_ANDX requests come with the
> Count set to the Filesize specified
> in the NT_CREATE_ANDX command. The MaxCount field not being set correctly
> is causing multiple SMB_COM_READ_ANDX
> commands to be triggered with different offset and Count values, even if
> the filesize is as small as 8 bytes.
>
> Is there something I am missing or not setting prior to the
> SMB_COM_READ_ANDX? How does this parameter get set in
> the SMB_COM_READ_ANDX command.
>
> The protocol I have negotiated is NT LM 0.12.
>
> Thanks
>
> Sailaja Josyula
> Websphere Portal
> IBM Software Group
> Phone: 914-784-5472 Tie Line: 863-5472 Fax: 914-784-3833
> sailaja at us.ibm.com
--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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 samba-technical
mailing list