2.2.3.1.1 SMB_COM_SEND_MESSAGE Request Message

The SMB_COM_SEND_MESSAGE message is used to send an entire text message in which the length of the message is 128 bytes or less.

In the SMB header of these messages, the Command field MUST be set to 0xD0, as specified in [MS-SMB] section 2.2.3.1. In the response message, the header MAY contain a Status code, as specified in [MS-SMB] section 2.2.3.1. All other fields in the SMB header MUST be set to 0x00.<3>

The payload of the SMB_COM_SEND_MESSAGE request message is specified as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

WordCount

ByteCount

BufferFormat1

OriginatorName (variable)

...

BufferFormat2

DestinationName (variable)

...

BufferFormat3

DataLength

Data (variable)

...

WordCount (1 byte): An 8-bit value that MUST denote the number of 2-byte word values between the WordCount and ByteCount values. WordCount MUST be zero for this message.

ByteCount (2 bytes): A 16-bit value that MUST denote the total size of all of the fields that follow, in bytes.

BufferFormat1 (1 byte): A constant that MUST denote the type of the next parameter. BufferFormat1 MUST be 0x04 in this message, indicating that the next parameter is a null-terminated ASCII string.

OriginatorName (variable): A null-terminated ASCII string that MUST denote the name of the sender of the message. OriginatorName MUST NOT be more than 15 characters (bytes) long, exclusive of the trailing null character (with the trailing null character, this field MAY be 16 bytes long).

BufferFormat2 (1 byte): An 8-bit value that MUST contain a constant that specifies the type of the next parameter. BufferFormat2 MUST be 0x04 in this message, indicating that the next parameter is a null-terminated ASCII string.

DestinationName (variable): A null-terminated ASCII string that MUST denote the name of the intended recipient of the message. DestinationName MUST NOT be more than 15 characters (bytes) long, exclusive of the trailing null character (with the trailing null character, this field MAY be 16 bytes long).

BufferFormat3 (1 byte):  An 8-bit value that MUST contain a constant that specifies the type of the next parameter. BufferFormat3 MUST be 0x01 in this message, indicating that the next parameter is a length-prefixed buffer of bytes.

DataLength (2 bytes): A 16-bit value that MUST specify the length of the Data buffer. This value MUST NOT be greater than 128 (0x0080).

Data (variable): A null-terminated ASCII string that MUST contain the text of the message. Before the message is sent, the ASCII characters CR (0x0D) and LF (0x0A) MUST be converted to the value 0x14. Pairs of these characters (CRLF or LFCR) SHOULD be converted into a single 0x14 character. This buffer MUST NOT be more than 128 bytes in size.<4>

The response message to SMB_COM_SEND_MESSAGE is specified in section 2.2.3.1.2.