Export (0) Print
Expand All

4 Protocol Examples

Mailslots are supported by three higher-level specialized functions, CreateMailslot, GetMailslotInfo, and SetMailslotInfo. These functions are used by the mailslot server. Note that none of these translate into SMB commands, as specified in [MS-SMB] section 2.2.3.1.

It is recommended that CreateMailslot create a local mailslot, return the server-side handle to this mailslot, and map to the higher-level server-side event (see section 3.2.4.1). GetMailslotInfo and SetMailslotInfo are server-specific configurations about how long the server will block a read request while waiting for the message to arrive before failing back to the application, and they are implementation-specific API for local operations and not related to how the protocol functions.

 The client would call the CreateFile function to open a mailslot and then call the WriteFile function (for more information, see [MSLOT]) to write to it. It is this write file call that generates traffic, as specified in section 3.1.4.1.

The following network traffic capture depicts the protocol message sequence for a mailslot write from a client to a mailslot server with the mailslot name \MAILSLOT\test1\sample_mailslot. This network trace is generated when a client application invokes the Remote Mailslot Protocol to send a mailslot message to a remote server, as specified in section 3.1.4.1. For a detailed description of the fields in this example, see section 2.2.1.

 FRAME 1 – SMB_COM_TRANSACTION MailSlot Write

 Unparsed:
  
 FF 53 4D 42 25 00 00 00 00 18 04 00 00 00 00 00
      SMB%............ 
 00 00 00 00 00 00 00 00 00 00 FF FE 00 00 00 00
      .........ÿþ..... 
 11 00 00 24 00 02 00 00 00 00 00 02 00 00 00 00
      ..$.............
 00 00 00 00 00 68 00 24 00 68 00 03 00 01 00 00
      ....h.$.h.......
 00 02 00 47 00 5C 4D 41 49 4C 53 4C 4F 54 5C 74
      ..G.\MAILSLOT\te
 65 73 74 31 5C 73 61 6D 70 6C 65 5F 6D 61 69 6C
      st1\sample_mails
 73 6C 6F 74 00 00 00 00 CA CA CA CA CA CA CA CA
      lot....ÊÊÊÊÊÊÊÊÊ
 CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA
      ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊ
 CA CA CA CA CA CA CA CA CA CA CA CA
      ÊÊÊÊÊÊÊÊÊÊÊ
  
 Parsed:
  
 Smb: C; Transact, Mail Slots, Write Mail Slot,
  FileName = \MAILSLOT\test1\sample_mailslot
 Protocol: SMB
 Command: Transact 37(0x25)
 DOSError: No Error
 ErrorClass: No Error
 Reserved: 0 (0x0)
 Error: No Error
 SMBHeader: Command, TID: 0x0000, PID: 0xFEFF, 
 UID: 0x0000, MID: 0x0000
 Flags: 24 (0x18)
 Flags2: 4 (0x4)
 PIDHigh: 0 (0x0)
 SecuritySignature: 0x0
 Reserved: 0 (0x0)
 TreeID: 0 (0x0)
 ProcessID: 65279 (0xFEFF)
 UserID: 0 (0x0)
 MultiplexID: 0 (0x0)
 CTransaction: 
 WordCount: 17 (0x11)
 TotalParameterCount: 0 (0x0)
 TotalDataCount: 36 (0x24)
 MaxParameterCount: 2 (0x2)
 MaxDataCount: 0 (0x0)
 MaxSetupCount: 0 (0x0)
 Reserved1: 0 (0x0)
 Flags: Do not disconnect TID
 Timeout: 0 sec(s)
 Reserved2: 0 (0x0)
 ParameterCount: 0 (0x0)
 ParameterOffset: 104 (0x68)
 DataCount: 36 (0x24)
 DataOffset: 104 (0x68)
 SetupCount: 3 (0x3)
 Reserved3: 0 (0x0)
 MailSlotsSetupWords: 
 MailSlotOpcode: Write Mail Slot
 TransactionPriority: 0 (0x0)
 MailSlotClass: Unreliable & Broadcast
 ByteCount: 71 (0x47)
 MailSlotsBuffer: 
 FileName: \MAILSLOT\test1\sample_mailslot
 Pad2: Binary Large Object (3 Bytes)
 MailSlotData: Binary Large Object (36 Bytes)
 CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA 
 CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA CA 
 CA CA CA CA
Show:
© 2016 Microsoft