C# 클래스 Microsoft.Protocol.TestSuites.Smbd.TestSuite.SmbdDataTransfer

상속: Microsoft.Protocols.TestTools.TestClassBase
파일 보기 프로젝트 열기: Microsoft/WindowsProtocolTestSuites

공개 메소드들

메소드 설명
CommonTestMethod_ModifyField_SmbdDataTransfer ( uint maxSendSize, uint maxFragmentSize, uint maxReceiveSize, uint bufferLength, int modifyFieldAddress, uint modifyValue, bool useMaxSendSize = false ) : void

Modify DataOffset in SMBDirect Data Transfer message

CommonTestMethod_RemainingDataLength_AgainstMaxFragmentedSize ( uint remainingDataLength, bool useMaxFragmentedSize = false ) : void
Initialize_ReceiveSmbdDataTransferTestCase ( uint maxSendSize, uint maxFragmentSize, uint maxReceiveSize, uint smb2ReadResponseSize, bool isUseMaxSendSize = false, bool isUseMaxFragmentedSize = false ) : void

Initialize receive SMBDirect data transfer test case And send the SMB2 READ request to peer

Initialize_SendSmbdDataTransferTestCase ( uint maxSendSize, uint maxFragmentSize, uint maxReceiveSize, uint smb2WriteRequestSize, byte &fileContent, byte &smb2WriteRequestPacket, bool isUseMaxSendSize = false ) : void

Initialize send SMBDirect data transfer test case. In this method, it will connect to server, SMBDirect negotiate with server and SMB2 intiailize. And generate SMB2 WRITE request according the size

LogSmbdEndpointEvent ( string log ) : void
SendMultipleSegmentsWithVariableDataLength ( byte data, bool isMininum = false, bool withRedundancyBytes = false ) : void

Send multiple segments If isMininum is not set, generate list of number from 128 to 0 and then 0 to ~. For example, 128, 127, 126 ... 1, 0, 1, 2, ... Else, generate list of number with all number one: 1, 1, 1, ..... Split the input data into slices. Data length of each slice follows the number and number sequence in the list just generated. Send the SMBD Data Transfer messages to server.

SendWithInvalidRemainingDataLength ( List messages, int messageNumber, int remainingDataLength, bool isModify = false ) : void
ValidateFileContent ( byte fileContent ) : void

Read back file content and validate whether read content is the same as written content

ValidateReadResponse ( int readResponseSize ) : void

Receive and validate SMB2 Read Response

ValidateWriteResponse ( byte fileContent ) : void

Receive and validate SMB2 Write Response

보호된 메소드들

메소드 설명
TestCleanup ( ) : void
TestInitialize ( ) : void

비공개 메소드들

메소드 설명
BVT_SmbdDataTransfer_Basic_SendModerateBytesData ( ) : void
BVT_SmbdDataTransfer_Basic_SendSmallBytesOfData ( ) : void
ClassCleanup ( ) : void
ClassInitialize ( Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context ) : void
SmbdDataTransfer_IdleConnection_Client ( ) : void
SmbdDataTransfer_IdleConnection_Server ( ) : void
SmbdDataTransfer_IdleConnection_Server_Timeout ( ) : void
SmbdDataTransfer_NegativeParameter_AgainstMaxFragmentedSize ( ) : void
SmbdDataTransfer_NegativeParameter_DataLength_AgainstMaxReceiveSize ( ) : void
SmbdDataTransfer_NegativeParameter_DataLength_AgainstMessageLength ( ) : void
SmbdDataTransfer_NegativeParameter_DataOffset_Against8ByteAligned ( ) : void
SmbdDataTransfer_NegativeParameter_DataOffset_AgainstMessageLength ( ) : void
SmbdDataTransfer_NegativeParameter_RemainingDataLength_AgainstFragmentReassemblyRemaining ( ) : void
SmbdDataTransfer_NegativeParameter_RemainingDataLength_AgainstMaxFragmentedSize ( ) : void
SmbdDataTransfer_NegativeParameter_RemainingDataLength_Zero ( ) : void
SmbdDataTransfer_ReceiveMaxReceiveSize ( ) : void
SmbdDataTransfer_Redundancy ( ) : void
SmbdDataTransfer_SmallLengthSegment ( ) : void
SmbdDataTransfer_UncompletedMessage ( ) : void
SmbdDataTransfer_VariableLengthSegment ( ) : void

메소드 상세

CommonTestMethod_ModifyField_SmbdDataTransfer() 공개 메소드

Modify DataOffset in SMBDirect Data Transfer message
public CommonTestMethod_ModifyField_SmbdDataTransfer ( uint maxSendSize, uint maxFragmentSize, uint maxReceiveSize, uint bufferLength, int modifyFieldAddress, uint modifyValue, bool useMaxSendSize = false ) : void
maxSendSize uint
maxFragmentSize uint
maxReceiveSize uint
bufferLength uint
modifyFieldAddress int
modifyValue uint
useMaxSendSize bool
리턴 void

CommonTestMethod_RemainingDataLength_AgainstMaxFragmentedSize() 공개 메소드

public CommonTestMethod_RemainingDataLength_AgainstMaxFragmentedSize ( uint remainingDataLength, bool useMaxFragmentedSize = false ) : void
remainingDataLength uint
useMaxFragmentedSize bool
리턴 void

Initialize_ReceiveSmbdDataTransferTestCase() 공개 메소드

Initialize receive SMBDirect data transfer test case And send the SMB2 READ request to peer
public Initialize_ReceiveSmbdDataTransferTestCase ( uint maxSendSize, uint maxFragmentSize, uint maxReceiveSize, uint smb2ReadResponseSize, bool isUseMaxSendSize = false, bool isUseMaxFragmentedSize = false ) : void
maxSendSize uint The maximum single-message size which can be sent by the local peer for this connection.
maxFragmentSize uint The maximum fragmented upper-layer payload receive size supported by the local peer for this connection.
maxReceiveSize uint The maximum single-message size which can be received from the remote peer for this connection.
smb2ReadResponseSize uint The size of SMB2 Read response.
isUseMaxSendSize bool Use client's MaxReceivedSize as smb2ReadResponseSize
isUseMaxFragmentedSize bool Use client's MaxFragmentedSize as smb2ReadResponseSize
리턴 void

Initialize_SendSmbdDataTransferTestCase() 공개 메소드

Initialize send SMBDirect data transfer test case. In this method, it will connect to server, SMBDirect negotiate with server and SMB2 intiailize. And generate SMB2 WRITE request according the size
public Initialize_SendSmbdDataTransferTestCase ( uint maxSendSize, uint maxFragmentSize, uint maxReceiveSize, uint smb2WriteRequestSize, byte &fileContent, byte &smb2WriteRequestPacket, bool isUseMaxSendSize = false ) : void
maxSendSize uint The maximum single-message size which can be sent by the local peer for this connection.
maxFragmentSize uint The maximum fragmented upper-layer payload receive size supported by the local peer for this connection.
maxReceiveSize uint The maximum single-message size which can be received from the remote peer for this connection.
smb2WriteRequestSize uint Size of SMB2 WRITE request packet
fileContent byte file content according the input file size
smb2WriteRequestPacket byte SMB2 WRITE request packet
isUseMaxSendSize bool /// If this flag is true, smb2WriteRequestSize will be data offset /// file content size = negotiated MaxSendSize - smb2WriteRequestSize (DataOffset) ///
리턴 void

LogSmbdEndpointEvent() 공개 메소드

public LogSmbdEndpointEvent ( string log ) : void
log string
리턴 void

SendMultipleSegmentsWithVariableDataLength() 공개 메소드

Send multiple segments If isMininum is not set, generate list of number from 128 to 0 and then 0 to ~. For example, 128, 127, 126 ... 1, 0, 1, 2, ... Else, generate list of number with all number one: 1, 1, 1, ..... Split the input data into slices. Data length of each slice follows the number and number sequence in the list just generated. Send the SMBD Data Transfer messages to server.
public SendMultipleSegmentsWithVariableDataLength ( byte data, bool isMininum = false, bool withRedundancyBytes = false ) : void
data byte Data to be sent.
isMininum bool Indicate whether the function is used by test case "SmbdDataTransfer_SmallLengthSegment".
withRedundancyBytes bool With Redundancy Bytes at the end of SMBD Data Transfer messages
리턴 void

SendWithInvalidRemainingDataLength() 공개 메소드

public SendWithInvalidRemainingDataLength ( List messages, int messageNumber, int remainingDataLength, bool isModify = false ) : void
messages List
messageNumber int
remainingDataLength int
isModify bool
리턴 void

TestCleanup() 보호된 메소드

protected TestCleanup ( ) : void
리턴 void

TestInitialize() 보호된 메소드

protected TestInitialize ( ) : void
리턴 void

ValidateFileContent() 공개 메소드

Read back file content and validate whether read content is the same as written content
public ValidateFileContent ( byte fileContent ) : void
fileContent byte
리턴 void

ValidateReadResponse() 공개 메소드

Receive and validate SMB2 Read Response
public ValidateReadResponse ( int readResponseSize ) : void
readResponseSize int Size of SMB2 read response
리턴 void

ValidateWriteResponse() 공개 메소드

Receive and validate SMB2 Write Response
public ValidateWriteResponse ( byte fileContent ) : void
fileContent byte
리턴 void