Web host forum - 3.3.1 SMB Format Richard Sharpe of the Samba

3.3.1 SMB Format Richard Sharpe of the Samba team defines SMB as a “request-response” protocol.[4] In effect, this means that a client sends an SMB request to a server, and the server sends an SMB response back to the client. Rarely does a server send a message that is not in response to a client. [4] See http://anu.samba.org/cifs/docs/what-is-smb.html for Richard s excellent summary of SMB. An SMB message is not as complex as you might think. Let s take a closer look at the internal structure of such a message. It can be broken down into two parts: the header, which is a fixed size, and the command string, whose size can vary dramatically based on the contents of the message. 3.3.1.1 SMB header format Table 3.1 shows the format of an SMB header. SMB commands are not required to use all the fields in the SMB header. For example, when a client first attempts to connect to a server, it does not yet have a tree identifier (TID) value - one is assigned after it successfully connects - so a null TID (0xFFFF) is placed in its header field. Other fields may be padded with zeros when not used. The fields of the SMB header are listed in Table 3.1. Table 3.1: SMB Header Fields Field Size (bytes) Description 0xFF SMB 1 Protocol identifier COM 1 Command code, from 0×00 to 0xFF RCLS 1 Error class REH 1 Reserved ERR 2 Error code REB 1 Reserved RES 14 Reserved TID 2 Tree identifier; a unique ID for a resource in use by client PID 2 Caller process ID UID 2 User identifier MID 2 Multiplex identifier; used to route requests inside a process 3.3.1.2 SMB command format Immediately after the header is a variable number of bytes that constitute an SMB command or reply. Each command, such as Open File (COM field identifier: SMBopen) or Get Print Queue (SMBsplretq), has its own set of parameters and data. Like the SMB header fields, not all of the command fields need to be filled, depending on the specific command. For example, the Get Server Attributes (SMBdskattr) command sets the WCT and BCC fields to zero. The fields of 91
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Leave a Reply