Compartilhar via


2.2.1.3 Named Pipe Status (SMB_NMPIPE_STATUS)

The SMB_NMPIPE_STATUS data type is a 16-bit field that encodes the status of a named pipe. Any combination of the following flags MUST be valid. The ReadMode and NamedPipeType bit fields are defined as 2-bit integers. Subfields marked Reserved SHOULD be set to zero by the server and MUST be ignored by the client.

This type is declared as follows:

 typedef unsigned SHORT SMB_NMPIPE_STATUS;

Name and bitmask

Meaning

ICount

0x000FF

An 8-bit unsigned integer that gives the maximum number of instances the named pipe can have.

ReadMode

0x0300

0

This bit field indicates the client read mode for the named pipe. This bit field has no effect on writes to the named pipe. A value of zero indicates that the named pipe was opened in or set to byte mode by the client.

1

A value of 1 indicates that the client opened or set the named pipe to message mode.

2,3

Reserved. Bit 0x0200 MUST be ignored.

NamedPipeType

0x0C00

0

This bit field indicates the type of the named pipe when the named pipe was created by the server. A value of zero indicates that the named pipe was created as a byte mode pipe.

1

The named pipe was created by the server as a message mode pipe.

2,3

Reserved. Bit 0x0800 MUST be ignored.

0x3000

Reserved. MUST be ignored.

Endpoint

0x4000

0

Client-side end of the named pipe. The SMB server MUST clear the Endpoint bit (set it to zero) when responding to the client request because the CIFS client is a consumer requesting service from the named pipe. When this bit is clear, it indicates that the client is accessing the consumer endpoint.

1

Indicates the server end of the pipe.

Nonblocking

0x8000

0

A named pipe read or raw read request will wait (block) until sufficient data to satisfy the read request becomes available, or until the request is canceled.

A named pipe write or raw write request blocks until its data is consumed, if the write request length is greater than zero.

1

A read or a raw read request returns all data available to be read from the named pipe, up to the maximum read size set in the request.

Write operations return after writing data to named pipes without waiting for the data to be consumed.

Named pipe non-blocking raw writes are not allowed. Raw writes MUST be performed in blocking mode.