3.2.4.4 Sending Mailslot Messages or SMB Messages

Although this protocol has no methods for constructing or sending mailslot messages or SMB messages, the message server MUST be able to receive such messages. Therefore, it is necessary to discuss how such messages are constructed.

The sender MUST select a recipient name (called To) for the message. To MUST be a valid NetBIOS name of type 0x03. To MUST not begin with an asterisk character.

The sender SHOULD provide a From name field, indicating the sender of the message. If no sender name is available, the sender SHOULD use the NetBIOS name of the local computer as the From field.

The sender SHOULD provide textual content for the message (called Text). Text MUST be represented in the OEM character set and MUST be 652 bytes or less in length.

The sender MAY send the message to the mailslot \\recipient name\MAILSLOT\MESSNGR on all LANAs.

The sender MAY send the message as a directed SMB on each LANA, as defined in the following.

If the message text is 128 bytes or less in length, the sender SHOULD send the message as an SMB_COM_SEND_MESSAGE request message. The SMB_COM_SEND_MESSAGE request message MUST be constructed as follows:

  • From MUST be a valid NetBIOS name.

  • From MUST be converted to a null-terminated ASCII string and be placed in the OriginatorName field.

  • To MUST be a valid NetBIOS name.

  • To MUST be converted to a null-terminated ASCII string and be placed in the DestinationName field.

  • Text MUST be placed in the Data buffer.

If the message text is more than 128 bytes in length, the sender SHOULD break the message text into 128-byte segments. In this case:

  • The sender MUST send the first segment as an SMB_COM_SEND_START_MB_MESSAGE request message. The SMB_COM_SEND_START_MB_MESSAGE request message MUST be constructed as follows:

    • From MUST be a valid NetBIOS name.

    • From MUST be converted to a null-terminated ASCII string and be placed in the OriginatorName field.

    • To MUST be a valid NetBIOS name.

    • To MUST be converted to a null-terminated ASCII string and be placed in the DestinationName field.

  • The sender SHOULD wait for the acknowledgment, an SMB_COM_SEND_START_MB_MESSAGE response message, before proceeding.

  • The sender MUST send each additional segment as an SMB_COM_SEND_TEXT_MB_MESSAGE request message. The SMB_COM_SEND_TEXT_MB_MESSAGE request message MUST be constructed as follows:

    •  The Data field of each of these messages MUST contain sequential, contiguous segments of Text.

    • Every segment of Text except the last SHOULD be exactly 128 bytes in length.

    • The sender SHOULD NOT send additional segments until acknowledgment is received that the previous segment is received in the form of an SMB_COM_SEND_TEXT_MB_MESSAGE response message.

  • After sending the last segment of Text, the sender MUST send an SMB_COM_SEND_END_MB_MESSAGE request message.<25>