[cifs-protocol] Fragmented SMB packets

Adam Simpkins simpkins at neopathnetworks.com
Wed Apr 12 19:49:56 GMT 2006


On Wed, Apr 12, 2006 at 01:17:34PM +0100, Joseph Kuan wrote:
>    I notice if I browse a remote directory with lots of file 
> (FIND_FIRST_2), then the response is fragmented into multiple tcp 
> packets. The subsequent packets without SMB headers.
> 
>    What happen if there are two different PIDs both issuing SMB command 
> that will end up fragmented TCP packets response?

I'm not quite sure I understand your question.

There should be no problem in this scenario.  TCP is merely used to
send a data stream.  The sender's TCP layer sends the data out in as
many packets as it wants, and the receiver's TCP layer receives it and
presents it as a single data stream to higher-level network layers
(NetBIOS or plain SMB in the case of CIFS).

The NetBIOS/SMB layer doesn't know or care about how many TCP packets
were used to send any particular message.  The sender simply sends
SMBs to the TCP layer as a data stream, and the receiver receives that
same data stream on the other end.  The receiver breaks the data up
into SMBs based on the NetBIOS header, and then associates responses
with requests based on the Pid and Mid fields.

-- 
Adam Simpkins
simpkins at neopathnetworks.com


More information about the cifs-protocol mailing list