public NtStatus SmbdRegisterBuffer( uint length, SmbdBufferReadWrite flag, bool reversed, out SmbdBufferDescriptorV1 descriptor ) { return(this.smbdClient.RegisterBuffer(length, flag, reversed, out descriptor)); }
/// <summary> /// register the memory locations indicated by the buffer with the underlying RDMA provider /// </summary> /// <param name="length"></param> /// <param name="flag">Read or Write flag</param> /// <param name="descriptor">Buffer Descriptor point to registered buffer</param> /// <param name="reversed">if it is true, little-endian and big-endian will be reversed in bufferDescriptor</param> /// <returns></returns> public NtStatus RegisterBuffer( uint length, SmbdBufferReadWrite flag, bool reversed, out SmbdBufferDescriptorV1 descriptor ) { RdmaBufferDescriptorV1 rdmaDescriptor; RdmaOperationReadWriteFlag readWriteFlag; if (flag == SmbdBufferReadWrite.RDMA_READ_PERMISSION_FOR_WRITE_FILE) { readWriteFlag = RdmaOperationReadWriteFlag.Read; } else if (flag == SmbdBufferReadWrite.RDMA_WRITE_PERMISSION_FOR_READ_FILE) { readWriteFlag = RdmaOperationReadWriteFlag.Write; } else { readWriteFlag = RdmaOperationReadWriteFlag.ReadAndWrite; } NtStatus status = (NtStatus)Connection.Endpoint.RegisterMemoryWindow( length, readWriteFlag, reversed, out rdmaDescriptor ); descriptor = new SmbdBufferDescriptorV1(); if (status != NtStatus.STATUS_SUCCESS) { return(status); } descriptor.Length = rdmaDescriptor.Length; descriptor.Offset = rdmaDescriptor.Offset; descriptor.Token = rdmaDescriptor.Token; return(NtStatus.STATUS_SUCCESS); }
/// <summary> /// register the memory locations indicated by the buffer with the underlying RDMA provider /// </summary> /// <param name="length"></param> /// <param name="flag">Read or Write flag</param> /// <param name="descriptor">Buffer Descriptor point to registered buffer</param> /// <param name="reversed">if it is true, little-endian and big-endian will be reversed in bufferDescriptor</param> /// <returns></returns> public NtStatus RegisterBuffer( uint length, SmbdBufferReadWrite flag, bool reversed, out SmbdBufferDescriptorV1 descriptor ) { RdmaBufferDescriptorV1 rdmaDescriptor; RdmaOperationReadWriteFlag readWriteFlag; if (flag == SmbdBufferReadWrite.RDMA_READ_PERMISSION_FOR_WRITE_FILE) { readWriteFlag = RdmaOperationReadWriteFlag.Read; } else if (flag == SmbdBufferReadWrite.RDMA_WRITE_PERMISSION_FOR_READ_FILE) { readWriteFlag = RdmaOperationReadWriteFlag.Write; } else { readWriteFlag = RdmaOperationReadWriteFlag.ReadAndWrite; } NtStatus status = (NtStatus)Connection.Endpoint.RegisterMemoryWindow( length, readWriteFlag, reversed, out rdmaDescriptor ); descriptor = new SmbdBufferDescriptorV1(); if (status != NtStatus.STATUS_SUCCESS) { return status; } descriptor.Length = rdmaDescriptor.Length; descriptor.Offset = rdmaDescriptor.Offset; descriptor.Token = rdmaDescriptor.Token; return NtStatus.STATUS_SUCCESS; }
public NtStatus SmbdRegisterBuffer( uint length, SmbdBufferReadWrite flag, out SmbdBufferDescriptorV1 descriptor ) { return this.client.SmbdRegisterBuffer( length, flag, testConfig.ReversedBufferDescriptor, out descriptor); }