:orphan: .. index:: pair: group; tool functions TAPI .. _doxid-group__tapi__netperf: tool functions TAPI =================== .. toctree:: :hidden: enum_tapi_netperf_test_name.rst enum_tapi_netperf_test_type.rst struct_tapi_netperf_opt.rst struct_tapi_netperf_report.rst struct_tapi_netperf_test_opt.rst Overview ~~~~~~~~ TAPI to handle netperf tool. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef enum :ref:`tapi_netperf_test_name` :ref:`tapi_netperf_test_name`; typedef enum tapi_netperf_test_type :target:`tapi_netperf_test_type`; typedef struct :ref:`tapi_netperf_test_opt` :ref:`tapi_netperf_test_opt`; typedef struct :ref:`tapi_netperf_opt` :ref:`tapi_netperf_opt`; typedef struct :ref:`tapi_netperf_report` :ref:`tapi_netperf_report`; typedef struct :ref:`tapi_netperf_app_server_t` :ref:`tapi_netperf_app_server_t`; typedef struct :ref:`tapi_netperf_app_client_t` :ref:`tapi_netperf_app_client_t`; // enums enum :ref:`tapi_netperf_test_name`; enum :ref:`tapi_netperf_test_type`; // structs struct :ref:`tapi_netperf_opt`; struct :ref:`tapi_netperf_report`; struct :ref:`tapi_netperf_test_opt`; // global variables const :ref:`tapi_netperf_opt` :ref:`tapi_netperf_default_opt`; // global functions :ref:`te_errno` :ref:`tapi_netperf_create_client`(:ref:`tapi_job_factory_t`* factory, const :ref:`tapi_netperf_opt`* opt, :ref:`tapi_netperf_app_client_t`** app); :ref:`te_errno` :ref:`tapi_netperf_create_server`(:ref:`tapi_job_factory_t`* factory, const :ref:`tapi_netperf_opt`* opt, :ref:`tapi_netperf_app_server_t`** app_server); :ref:`te_errno` :ref:`tapi_netperf_create`(:ref:`tapi_job_factory_t`* client_factory, :ref:`tapi_job_factory_t`* server_factory, const :ref:`tapi_netperf_opt`* opt, :ref:`tapi_netperf_app_client_t`** client, :ref:`tapi_netperf_app_server_t`** server); :ref:`te_errno` :ref:`tapi_netperf_start_client`(:ref:`tapi_netperf_app_client_t`* app); :ref:`te_errno` :ref:`tapi_netperf_start_server`(:ref:`tapi_netperf_app_server_t`* app); :ref:`te_errno` :ref:`tapi_netperf_start`(:ref:`tapi_netperf_app_client_t`* client, :ref:`tapi_netperf_app_server_t`* server); :ref:`te_errno` :ref:`tapi_netperf_wait_client`(:ref:`tapi_netperf_app_client_t`* app, int timeout_ms); :ref:`te_errno` :ref:`tapi_netperf_wait_server`(:ref:`tapi_netperf_app_server_t`* app, int timeout_ms); :ref:`te_errno` :ref:`tapi_netperf_get_report`(:ref:`tapi_netperf_app_client_t`* app, :ref:`tapi_netperf_report`* report); :ref:`te_errno` :ref:`tapi_netperf_kill_client`(:ref:`tapi_netperf_app_client_t`* app, int signo); :ref:`te_errno` :ref:`tapi_netperf_kill_server`(:ref:`tapi_netperf_app_server_t`* app, int signo); :ref:`te_errno` :ref:`tapi_netperf_kill`(:ref:`tapi_netperf_app_client_t`* client, :ref:`tapi_netperf_app_server_t`* server, int signo); :ref:`te_errno` :ref:`tapi_netperf_destroy_client`(:ref:`tapi_netperf_app_client_t`* app); :ref:`te_errno` :ref:`tapi_netperf_destroy_server`(:ref:`tapi_netperf_app_server_t`* app); :ref:`te_errno` :ref:`tapi_netperf_mi_report`(const :ref:`tapi_netperf_report`* report); :ref:`te_errno` :ref:`tapi_netperf_client_wrapper_add`(:ref:`tapi_netperf_app_client_t`* app, const char* tool, const char** argv, :ref:`tapi_job_wrapper_priority_t` priority, :ref:`tapi_job_wrapper_t`** wrap); :ref:`te_errno` :ref:`tapi_netperf_client_add_sched_param`(:ref:`tapi_netperf_app_client_t`* app, :ref:`tapi_job_sched_param`* sched_param); .. _details-group__tapi__netperf: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ TAPI to handle netperf tool. Copyright (C) 2019-2022 OKTET Labs Ltd. All rights reserved. Typedefs -------- .. index:: pair: typedef; tapi_netperf_test_name .. _doxid-group__tapi__netperf_1gaca10c8eea30f72c4f63726cb611618f5: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef enum :ref:`tapi_netperf_test_name` tapi_netperf_test_name Test name. It corresponds to "-t" option of 2.7.0 netperf version. .. index:: pair: typedef; tapi_netperf_test_opt .. _doxid-group__tapi__netperf_1ga95515b23a4d33c1db540929771f88cbf: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_netperf_test_opt` tapi_netperf_test_opt Test specific command line options. .. index:: pair: typedef; tapi_netperf_opt .. _doxid-group__tapi__netperf_1ga0ef481c02c16192f5960deefe1b3ee2d: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_netperf_opt` tapi_netperf_opt Command line options. .. index:: pair: typedef; tapi_netperf_report .. _doxid-group__tapi__netperf_1ga0d99bfbe143f8aa006dcf4211956b711: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_netperf_report` tapi_netperf_report Netperf report. .. index:: pair: typedef; tapi_netperf_app_server_t .. _doxid-group__tapi__netperf_1ga93d6ff460c0f62ab9ac2db4e9882071d: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_netperf_app_server_t` tapi_netperf_app_server_t Netserver tool context .. index:: pair: typedef; tapi_netperf_app_client_t .. _doxid-group__tapi__netperf_1ga65f6a81be4e7b4b74bad7f98f391ea18: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_netperf_app_client_t` tapi_netperf_app_client_t Netperf tool context. Global Variables ---------------- .. index:: pair: variable; tapi_netperf_default_opt .. _doxid-group__tapi__netperf_1ga954a898c94123398529421ad959ec3e2: .. ref-code-block:: cpp :class: doxyrest-title-code-block const :ref:`tapi_netperf_opt` tapi_netperf_default_opt Default options initializer Global Functions ---------------- .. index:: pair: function; tapi_netperf_create_client .. _doxid-group__tapi__netperf_1gaf184a00d665dab0bec1d7e868a7d1089: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_create_client(:ref:`tapi_job_factory_t`* factory, const :ref:`tapi_netperf_opt`* opt, :ref:`tapi_netperf_app_client_t`** app) Create netperf app for netperf. All needed information to run netperf is in ``opt``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - factory - Job factory. * - opt - Command line options. * - app - netperf app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_create_server .. _doxid-group__tapi__netperf_1gac04d5073e302584d914b82a60049319c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_create_server(:ref:`tapi_job_factory_t`* factory, const :ref:`tapi_netperf_opt`* opt, :ref:`tapi_netperf_app_server_t`** app_server) Create netserver app for netperf. All needed information to run netserver is in ``opt``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - factory - Job factory. * - opt - Command line options. * - app_server - netserver app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_create .. _doxid-group__tapi__netperf_1gaffcbfb178d341cb3db46ae93966fd3de: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_create(:ref:`tapi_job_factory_t`* client_factory, :ref:`tapi_job_factory_t`* server_factory, const :ref:`tapi_netperf_opt`* opt, :ref:`tapi_netperf_app_client_t`** client, :ref:`tapi_netperf_app_server_t`** server) Create netserver and netperf app. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - client_factory - Client job factory. * - server_factory - Server job factory. * - opt - Command line options. * - client - netperf app handle. * - server - netserver app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_start_client .. _doxid-group__tapi__netperf_1gae2edb5f24ca09d788255c39cba366ad8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_start_client(:ref:`tapi_netperf_app_client_t`* app) Start netperf. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_start_server .. _doxid-group__tapi__netperf_1ga7dd0c25c4c7d6b55b3e7cd1064cf4158: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_start_server(:ref:`tapi_netperf_app_server_t`* app) Start netserver. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netserver app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_start .. _doxid-group__tapi__netperf_1gab821f690463478091f160e3f6cc26980: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_start(:ref:`tapi_netperf_app_client_t`* client, :ref:`tapi_netperf_app_server_t`* server) Start netperf and netserver. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - client - netperf app handle. * - server - netserver app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_wait_client .. _doxid-group__tapi__netperf_1gaf4fb5a6bc6cd6e4a5523b63a25362d9d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_wait_client(:ref:`tapi_netperf_app_client_t`* app, int timeout_ms) Wait for netperf completion. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. * - timeout_ms - Wait timeout in milliseconds. (negative means :ref:`tapi_job_get_timeout() `) .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_wait_server .. _doxid-group__tapi__netperf_1ga1a4c5d046fb72a01c25a3d51f773f5b0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_wait_server(:ref:`tapi_netperf_app_server_t`* app, int timeout_ms) Wait for netserver completion. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netserver app handle. * - timeout_ms - Wait timeout in milliseconds. (negative means :ref:`tapi_job_get_timeout() `) .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_get_report .. _doxid-group__tapi__netperf_1ga6707056314662d2c8a83a88785362b8d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_get_report(:ref:`tapi_netperf_app_client_t`* app, :ref:`tapi_netperf_report`* report) Get netperf report. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. * - report - netperf statistics report. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_kill_client .. _doxid-group__tapi__netperf_1gac9a95a7585c66af174468a518cf811bc: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_kill_client(:ref:`tapi_netperf_app_client_t`* app, int signo) Send a signal to netperf. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. * - signo - Signal to send to netperf. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_kill_server .. _doxid-group__tapi__netperf_1gaa26d570326d33da5819e1ea6449d6ef0: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_kill_server(:ref:`tapi_netperf_app_server_t`* app, int signo) Send a signal to netserver. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netserver app handle. * - signo - Signal to send to netperf. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_kill .. _doxid-group__tapi__netperf_1ga8d4db8674af8654c89723e7ee6542c7b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_kill(:ref:`tapi_netperf_app_client_t`* client, :ref:`tapi_netperf_app_server_t`* server, int signo) Send a signal to netperf and netserver. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - client - netperf app hande. * - server - netserver app handle. * - signo - Signal to send to netperf. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_destroy_client .. _doxid-group__tapi__netperf_1ga15546393ce41322f920ebf81b3ff57b3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_destroy_client(:ref:`tapi_netperf_app_client_t`* app) Destroy netperf app. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_destroy_server .. _doxid-group__tapi__netperf_1gab3b07c24b79c3e37ed1ba620d8c352fa: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_destroy_server(:ref:`tapi_netperf_app_server_t`* app) Destroy netserver app. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netserver app handle. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_mi_report .. _doxid-group__tapi__netperf_1gab8c7a33cfa20630ba1733c3d4c1406b4: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_mi_report(const :ref:`tapi_netperf_report`* report) Output netperf report via MI logger. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - report - netperf report. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_client_wrapper_add .. _doxid-group__tapi__netperf_1gafc6504c40b7fabad218bcd104cfaf75f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_client_wrapper_add(:ref:`tapi_netperf_app_client_t`* app, const char* tool, const char** argv, :ref:`tapi_job_wrapper_priority_t` priority, :ref:`tapi_job_wrapper_t`** wrap) Add a wrapper tool/script to netperf .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. * - tool - Path to the wrapper tool. * - argv - Wrapper arguments (last item should be ``NULL``) * - priority - Wrapper priority. * - wrap - Wrapper instance handle .. rubric:: Returns: Status code. .. index:: pair: function; tapi_netperf_client_add_sched_param .. _doxid-group__tapi__netperf_1gaffa992728df31f878ea1a4d902d44617: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_netperf_client_add_sched_param(:ref:`tapi_netperf_app_client_t`* app, :ref:`tapi_job_sched_param`* sched_param) Add a scheduling parameters to netperf .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - app - netperf app handle. * - sched_param - Array of scheduling parameters. The last element must have the type ``TAPI_JOB_SCHED_END`` and data pointer to ``NULL``. .. rubric:: Returns: Status code