One, copy files (remote-to-local)
1, Smb_com_nt_create_andx (0XA2)
Open the file, get the filename, and get the total length of the read file.
2, Smb_com_read(0x2e)
Read the file and get the contents of the read file.
3, Smb_com_close (0x04)
The client closes the TID and fid representing the file.
The specific process of reading large files
Read files are chunked, each block up to 64k byte, each block is composed of read request+tcp data package+read response, such as.
(1) Without the read request containing the file data,
(2) The first TCP data package is made up of SMB header+ file data,
(3) followed by a number of TCP data package containing only file data,
(4) Finally, a read response that contains only the file data.
Second, copy files (local-to-remote)
1, Smb_com_nt_create_andx (0XA2)
Create a file to get the filename.
2, Smb_com_write(0x2f)
Write to the file and get the content written to it.
3, Smb_com_close (0x04)
The client closes the TID and fid representing the file.
The write file is chunked, with each block having a maximum of 64k byte, each of which is composed of TCP data Package+write request+write response, such as.
(1) The first TCP data package is made up of SMB header+ file data,
(2) followed by a number of TCP data package containing only file data,
(3) Then the write request that contains only the file data,
(4) Finally, there is no write response that contains the file data.
From:http://blog.sina.com.cn/s/blog_705eb43a0100o5ah.html
SMB/CIFS Protocol resolution