3.3.5.15.10 Handling a Pipe Wait Request

When the server receives a request with an SMB2 header with a Command value equal to SMB2 IOCTL and a CtlCode of FSCTL_PIPE_WAIT, message handling proceeds as follows.

The server MUST ensure that the Name field of the FSCTL_PIPE_WAIT request identifies a named pipe. If the Name field is malformed, or no such object exists, the server MUST fail the request with STATUS_OBJECT_NAME_NOT_FOUND. If an object of that name exists, but it is not a named pipe, the server MUST fail the request with STATUS_INVALID_DEVICE_REQUEST.

The server MUST attempt to wait for a connection to the specified named pipe. If TimeoutSpecified is TRUE in the FSCTL_PIPE_WAIT request, the server MUST wait for the amount of time specified in the Timeout field in the FSCTL_PIPE_WAIT request for a connection to the named pipe. If no connection is available within the specified time, the server MUST fail the request with STATUS_IO_TIMEOUT. If TimeoutSpecified is FALSE, the server MUST wait forever for a connection to the named pipe.

If a connection to the specified named pipe is available, the server MUST construct an SMB2 IOCTL Response by following the syntax specified in section 2.2.32, with the exception of the following values:

  • The CtlCode field MUST be set to FSCTL_PIPE_WAIT.

  • The FileId field MUST be set to { 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF }.

  • The OutputCount field MUST be set to 0.

The response MUST be sent to the client.