3.1.4.2.1.2.1 rgbIn Input Buffer

As mentioned in section 3.1.4.2.1.1.1, the rgbIn parameter of the EcDoRpcExt2 method, as specified in section 3.1.4.2, can contain more than one extended buffer, each with an RPC_HEADER_EXT structure, as specified in section 2.2.2.1. This concept is called packing. The client has the ability to pack additional request data into the rgbIn parameter based on whether the server has indicated it supports packing through the presence of flag PACKED_FAST_TRANSFER_UPLOAD_BUFFERS or flag PACKED_WRITE_STREAM_UPLOAD_BUFFERS in the ServerCapabilityFlags field of the  AUX_SERVER_CAPABILITIES auxiliary buffer, as specified in section 2.2.2.2.19, returned in the rgbAuxOut parameter of the EcDoConnectEx method, as specified in section 3.1.4.1.1.1.2. The ROP commands that support packing are the RopWriteStreamExtended ROP ([MS-OXCROPS] section 2.2.9.4) if PACKED_WRITE_STREAM_UPLOAD_BUFFERS is indicated as a server capability, or RopFastTransferDestinationPutBuffer ROP ([MS-OXCROPS] section 2.2.12.2) and RopFastTransferDestinationPutBufferExtended ROP ([MS-OXCROPS] section 2.2.12.3) if PACKED_FAST_TRANSFER_UPLOAD_BUFFERS is indicated.

Each extended buffer MUST NOT contain more than 32 KB worth of request data for all ROP requests. When processing ROP requests, the server MUST only allow a single RopWriteStreamExtended ROP ([MS-OXCROPS] section 2.2.9.4), a single RopFastTransferDestinationPutBuffer ROP ([MS-OXCROPS] section 2.2.12.2), or a single RopFastTransferDestinationPutBufferExtended ROP ([MS-OXCROPS] section 2.2.12.3) to be present in each subsequent packed extended buffers where the last ROP in the first extended buffer of the input buffer is a corresponding RopWriteStreamExtended ROP, RopFastTransferDestinationPutBuffer ROP, or RopFastTransferDestinationPutBufferExtended ROP.

The server MUST aggregate all packed request data into a single combined RopWriteStreamExtended ROP ([MS-OXCROPS] section 2.2.9.4), RopFastTransferDestinationPutBuffer ROP ([MS-OXCROPS] section 2.2.12.2) or RopFastTransferDestinationPutBufferExtended ROP ([MS-OXCROPS] section 2.2.12.3) request and process it as though it was sent as the last ROP of the first extended buffer in the rgbIn parameter.  The result of the aggregated ROP request MUST be returned in the first extended buffer in the rgbOut parameter of the EcDoRpcExt2 method, as specified in section 3.1.4.2.

For the RopWriteStreamExtended ROP, the server MUST return in the WrittenSize field of the RopWriteStreamExtended ROP ([MS-OXCROPS] section 2.2.9.4) response the combined amount of data written to the stream across all of the packed RopWriteStreamExtended ROP request operations.

For the RopFastTransferDestinationPutBuffer ROP, the server MUST return in the BufferUsedSize field of the RopFastTransferDesintationPutBuffer ROP ([MS-OXCROPS] section 2.2.12.2) response the amount of the buffer used in the last RopFastTransferDestinationPutBuffer ROP in the packed extended buffers.

For the RopFastTransferDestinationPutBufferExtended ROP, the server MUST return in the BufferUsedSize field of the RopFastTransferDesintationPutBufferExtended ROP ([MS-OXCROPS] section 2.2.12.3) response the amount of the buffer used in the last RopFastTransferDestinationPutBufferExtended ROP in the packed extended buffers.