3.2.4.37 Application Requests to Read from a Named Pipe

A client can request to read from a named pipe by issuing an SMB_COM_TRANSACTION Request with the subcommand TRANS_READ_NMPIPE. The application MUST provide a Client.Open indicating the open named pipe from which data is to be read. The application provides the maximum number of bytes that the client attempts to read from the named pipe.

Named pipes can be in raw mode or message mode (see TRANS_SET_NMPIPE_STATE). If the named pipe is in raw mode, as indicated by a Client.Open.NamedPipeMessageMode value of FALSE, it can be read by any of several Read operations (see section 3.2.4.14). If the pipe is in message mode, as indicated by a Client.Open.NamedPipeMessageMode value of TRUE, TRANS_READ_NMPIPE MUST be used to read discrete messages.

The client MUST construct the TRANS_READ_NMPIPE Request message and MUST send it to the server as specified in section 3.2.4.1.