C# Class Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smbd.SmbdConnectionEndpoint

The implementation-dependent representation used to access the RDMA connection.
Inheritance: IDisposable
Show file Open project: Microsoft/WindowsProtocolTestSuites

Public Methods

Method Description
ConnectToServerOverRdma ( String localIpAddress, String remoteIpAddress, UInt16 port, AddressFamily ipFamily ) : NtStatus

establish connection over RDMA

DeregisterMemoryWindow ( RdmaBufferDescriptorV1 bufferDescriptor ) : void

Deregister memory window

Disconnect ( ) : void

Disconnect

Dispose ( ) : void
GetRequestResult ( System.TimeSpan timeout, RequestType type ) : SmbdRequestResult

Get result of request

ListenConnection ( String localIpAddress, ushort port, AddressFamily ipFamily ) : NtStatus

listen and wait for peer connect

PostReceive ( uint bufferSize ) : NtStatus

Post Receive request

ReadMemoryWindow ( byte data, RdmaBufferDescriptorV1 bufferDescriptor ) : NtStatus

Read data from memory window

ReceiveData ( System.TimeSpan timeout, byte &data ) : NtStatus

Receive data over RDMA

RegisterMemoryWindow ( uint size, RdmaOperationReadWriteFlag flag, bool reversed, RdmaBufferDescriptorV1 &bufferDescriptor ) : NtStatus

Register memory windows

SendData ( byte data ) : NtStatus

Send data over RDMA

SmbdConnectionEndpoint ( uint inboundEntries, uint outboundEntries, uint inboundSegment, uint outboundSegment, uint inboundReadLimit, uint outboundReadLimit, uint inboundDataSize, SmbdLogEvent logEvent = null ) : System

SmbdEndpoint constructor will load RDMA providers and initialize default connection values.

WaitDisconnect ( System.TimeSpan timeout ) : void

Wait until network is disconnected, using a TimeSpan to specify the time interval.

WriteMemoryWindow ( byte data, RdmaBufferDescriptorV1 bufferDescriptor ) : NtStatus

Write data to memory window

Private Methods

Method Description
CompleteConnect ( ) : void

Complete the work of connection

LogEvent ( string str ) : void

log event

NotifyCallback ( Object stateInfo ) : void

Notify callback

NotifyDisconnectCallBack ( Object stateInfo ) : void

notify disconnect

OpenAdapter ( RdmaProviderInfo providers, string localIpAddress, AddressFamily ipFamily, SmbdLogEvent logEvent ) : RdmaAdapter

Open adapter with local IP address

OutputAddressInfoSupportedByProvider ( RdmaProviderInfo providerInfo, SmbdLogEvent logEvent ) : void

output all addresses which are supported by the provider

Method Details

ConnectToServerOverRdma() public method

establish connection over RDMA
public ConnectToServerOverRdma ( String localIpAddress, String remoteIpAddress, UInt16 port, AddressFamily ipFamily ) : NtStatus
localIpAddress String local IP address
remoteIpAddress String remote IP address
port System.UInt16 port
ipFamily AddressFamily IP Family
return NtStatus

DeregisterMemoryWindow() public method

Deregister memory window
public DeregisterMemoryWindow ( RdmaBufferDescriptorV1 bufferDescriptor ) : void
bufferDescriptor RdmaBufferDescriptorV1 Buffer Descriptor point to memory windows
return void

Disconnect() public method

Disconnect
public Disconnect ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

GetRequestResult() public method

Get result of request
public GetRequestResult ( System.TimeSpan timeout, RequestType type ) : SmbdRequestResult
timeout System.TimeSpan
type RequestType
return SmbdRequestResult

ListenConnection() public method

listen and wait for peer connect
public ListenConnection ( String localIpAddress, ushort port, AddressFamily ipFamily ) : NtStatus
localIpAddress String
port ushort
ipFamily AddressFamily IP Family IPv4 or IPv6
return NtStatus

PostReceive() public method

Post Receive request
public PostReceive ( uint bufferSize ) : NtStatus
bufferSize uint
return NtStatus

ReadMemoryWindow() public method

Read data from memory window
public ReadMemoryWindow ( byte data, RdmaBufferDescriptorV1 bufferDescriptor ) : NtStatus
data byte
bufferDescriptor RdmaBufferDescriptorV1 Buffer Descriptor point to memory windows
return NtStatus

ReceiveData() public method

Receive data over RDMA
public ReceiveData ( System.TimeSpan timeout, byte &data ) : NtStatus
timeout System.TimeSpan
data byte
return NtStatus

RegisterMemoryWindow() public method

Register memory windows
public RegisterMemoryWindow ( uint size, RdmaOperationReadWriteFlag flag, bool reversed, RdmaBufferDescriptorV1 &bufferDescriptor ) : NtStatus
size uint Size of memory to register
flag RdmaOperationReadWriteFlag
reversed bool if it is true, little-endian and big-endian will be reversed in bufferDescriptor
bufferDescriptor RdmaBufferDescriptorV1 Buffer Descriptor point to memory windows
return NtStatus

SendData() public method

Send data over RDMA
public SendData ( byte data ) : NtStatus
data byte
return NtStatus

SmbdConnectionEndpoint() public method

SmbdEndpoint constructor will load RDMA providers and initialize default connection values.
public SmbdConnectionEndpoint ( uint inboundEntries, uint outboundEntries, uint inboundSegment, uint outboundSegment, uint inboundReadLimit, uint outboundReadLimit, uint inboundDataSize, SmbdLogEvent logEvent = null ) : System
inboundEntries uint maximum number of outstanding Receive requests.
outboundEntries uint maximum number of outstanding Send, SendAndInvalidate /// , Bind, Invalidate, Read, and Write requests. ///
inboundSegment uint inbound segments limit
outboundSegment uint outbound segments limit
inboundReadLimit uint maximum inbound read limit for the local Network /// Direct adapter. This value can be zero if you do not support ///
outboundReadLimit uint
inboundDataSize uint Max Size of RDMA inbound data
logEvent SmbdLogEvent Delegate to log SMBD event
return System

WaitDisconnect() public method

Wait until network is disconnected, using a TimeSpan to specify the time interval.
public WaitDisconnect ( System.TimeSpan timeout ) : void
timeout System.TimeSpan
return void

WriteMemoryWindow() public method

Write data to memory window
public WriteMemoryWindow ( byte data, RdmaBufferDescriptorV1 bufferDescriptor ) : NtStatus
data byte
bufferDescriptor RdmaBufferDescriptorV1 Buffer Descriptor point to memory windows
return NtStatus