3.2.4.20.9 Application Requests Waiting for a Connection to a Pipe
The application provides:
A handle to the TreeConnect identifying the connection to the IPC$ share.
The name of the named pipe, omitting any prefixes such as "\pipe\".
An optional timeout value indicating the maximum amount of time to wait for availability of the pipe, in units of 100 milliseconds.
If the handle is invalid, or if no TreeConnect referenced by the tree connect handle is found, the client MUST return an implementation-specific error code locally to the calling application.
If the length of the name of the named pipe is greater than 0xFFFF, the client MUST fail the request and return STATUS_INVALID_PARAMETER to the calling application.
The client initializes an SMB2 IOCTL Request following the syntax specified in section 2.2.31. The SMB2 header MUST be initialized as follows:
The Command field is set to SMB2 IOCTL.
The MessageId field is set as specified in section 3.2.4.1.3.
The SessionId field is set to TreeConnect.Session.SessionId.
The TreeId field is set to TreeConnect.TreeConnectId.
The SMB2 IOCTL Request MUST be initialized as specified in section 2.2.31, with the exception of the following values:
The CtlCode field is set to FSCTL_PIPE_WAIT.
The FileId field is set to { 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF }.
The MaxInputResponse field is set to 0.
The MaxOutputResponse field is set to 0.
SMB2_0_IOCTL_IS_FSCTL is set to TRUE in the Flags field.
The Buffer field is set to an FSCTL_PIPE_WAIT Request, as specified in [MS-FSCC] section 2.3.49.
Timeout is set to the application provided timeout value, or 0 if none was provided.
TimeoutSpecified is set to TRUE if the application provided a timeout value, or FALSE otherwise.
Name is set to the name of the named pipe.
NameLength is set to the length, in bytes, of the Name field.
The InputOffset field is set to the offset to the Buffer, in bytes, from the beginning of the SMB2 header.
The InputCount field is set to the size, in bytes, of the Buffer field.
The request MUST be sent to the server.