tfTestTreck

Jump to: navigation, search

Table of Contents >> Application Reference >> Treck Test Suite


#include <trsocket.h>


int tfTestTreck (
int testType,
char * ipAddrStr,
int portNumber,
int dataSize,
ttUser32Bit testCount,
ttUser32Bit flags,
ttUserTestHandlePtr testHandlePtr,
void * testParam
);


Function Description

This function performs a network test according to the specified parameters. Not all parameters are meaningful for all tests. For instance, 'dataSize' has no meaning when the test type is TM_TEST_TCP_CONNECT since no data is being sent and 'testType' is not used when the TM_TEST_FLAG_RANDOM option is chosen since the test type is selected at random.


Parameters

  • testType
    The type of test to perform (see this page).
  • ipAddrStr
    A string containing the IP address of the remote host (i.e. "10.0.1.5").
  • portNumber
    The port on the remote host to perform the test against.
  • dataSize
    The data buffer size for this test (ie.e the size of the UDP datagram to send or the amount of data to receive).
  • testCount
    The number of times to execute this test.
  • flags
    The options to apply to this test (see this page).
  • testHandlePtr
    The pointer to a test handle. This is used in non-blocking mode to return a session handle to be used with tfTestUserExecute(). This parameter is not used in blocking mode.
  • testParam
    Not currently implemented.


Returns

  • TM_ENOERROR
    Test completed successfully.
  • TM_EINVAL
    Invalid test type specified or no test handle pointer specified in non-blocking mode.
  • TM_EWOULDBLOCK
    Returned when the test is run in non-blocking mode. The user should call tfTestUserExecute() with the value specified in 'testHandlePtr' to continue the test.
  • TM_EIO
    Incoming data failed validation.


Table of Contents >> Application Reference >> Treck Test Suite