NPtcp tool tapi (tapi_nptcp)
Overview
TAPI to handle NPtcp tool. More…
// typedefs typedef struct tapi_nptcp_opt tapi_nptcp_opt; typedef struct tapi_nptcp_report_entry tapi_nptcp_report_entry; typedef struct tapi_nptcp_app tapi_nptcp_app; // structs struct tapi_nptcp_app; struct tapi_nptcp_opt; struct tapi_nptcp_report_entry; // global variables const tapi_nptcp_opt tapi_nptcp_default_opt; // global functions te_errno tapi_nptcp_create(tapi_job_factory_t* factory_receiver, tapi_job_factory_t* factory_transmitter, const tapi_nptcp_opt* opt_receiver, const tapi_nptcp_opt* opt_transmitter, tapi_nptcp_app** app); te_errno tapi_nptcp_start(tapi_nptcp_app* app); te_errno tapi_nptcp_wait(tapi_nptcp_app* app, int timeout_ms); te_errno tapi_nptcp_wait_receiver(tapi_nptcp_app* app, int timeout_ms); te_errno tapi_nptcp_wait_transmitter(tapi_nptcp_app* app, int timeout_ms); te_errno tapi_nptcp_get_report(tapi_nptcp_app* app, te_vec* report); te_errno tapi_nptcp_kill_receiver(tapi_nptcp_app* app, int signum); te_errno tapi_nptcp_kill_transmitter(tapi_nptcp_app* app, int signum); te_errno tapi_nptcp_stop(tapi_nptcp_app* app); te_errno tapi_nptcp_destroy(tapi_nptcp_app* app); void tapi_nptcp_report_mi_log(te_mi_logger* logger, te_vec* report);
Detailed Documentation
TAPI to handle NPtcp tool.
Copyright (C) 2020-2022 OKTET Labs Ltd. All rights reserved.
Typedefs
typedef struct tapi_nptcp_opt tapi_nptcp_opt
NPtcp tool specific command line options
typedef struct tapi_nptcp_report_entry tapi_nptcp_report_entry
Entry (row) of NPtcp statistics report
typedef struct tapi_nptcp_app tapi_nptcp_app
Information of a NPtcp tool
Global Variables
const tapi_nptcp_opt tapi_nptcp_default_opt
Default options initializer
Global Functions
te_errno tapi_nptcp_create(tapi_job_factory_t* factory_receiver, tapi_job_factory_t* factory_transmitter, const tapi_nptcp_opt* opt_receiver, const tapi_nptcp_opt* opt_transmitter, tapi_nptcp_app** app)
Create NPtcp app.
Parameters:
factory_receiver |
Job factory for receiver. |
factory_transmitter |
Job factory for transmitter. |
opt_receiver |
Options to run NPtcp with on receiver’s side. |
opt_transmitter |
Options to run NPtcp with on transmitter’s side. |
app |
NPtcp app handle. |
Returns:
Status code.
te_errno tapi_nptcp_start(tapi_nptcp_app* app)
Start NPtcp.
Parameters:
app |
NPtcp app handle. |
Returns:
Status code.
te_errno tapi_nptcp_wait(tapi_nptcp_app* app, int timeout_ms)
Wait for NPtcp completion.
Parameters:
app |
NPtcp app handle. |
timeout_ms |
Wait timeout in milliseconds. |
Returns:
Status code.
te_errno tapi_nptcp_wait_receiver(tapi_nptcp_app* app, int timeout_ms)
Wait for NPtcp receiver completion. It should be used only if tapi_nptcp_kill_receiver() or tapi_nptcp_kill_transmitter() was called. If you want to wait for the tool completion, use tapi_nptcp_wait(). Same applies to tapi_nptcp_wait_transmitter().
Parameters:
app |
NPtcp app handle. |
timeout_ms |
Wait timeout in milliseconds. |
Returns:
Status code.
See also:
te_errno tapi_nptcp_wait_transmitter(tapi_nptcp_app* app, int timeout_ms)
Wait for NPtcp transmitter completion.
Parameters:
app |
NPtcp app handle. |
timeout_ms |
Wait timeout in milliseconds. |
Returns:
Status code.
See also:
te_errno tapi_nptcp_get_report(tapi_nptcp_app* app, te_vec* report)
Get NPtcp report.
Parameters:
app |
NPtcp app handle. |
report |
NPtcp report handle. May be passed uninitialized, should be freed with te_vec_free(). |
Returns:
Status code.
te_errno tapi_nptcp_kill_receiver(tapi_nptcp_app* app, int signum)
Send a signal to NPtcp running on receiver’s side.
Parameters:
app |
NPtcp app handle. |
signum |
Signal to send. |
Returns:
Status code.
te_errno tapi_nptcp_kill_transmitter(tapi_nptcp_app* app, int signum)
Send a signal to NPtcp running on transmitter’s side.
Parameters:
app |
NPtcp app handle. |
signum |
Signal to send. |
Returns:
Status code.
te_errno tapi_nptcp_stop(tapi_nptcp_app* app)
Stop NPtcp. It can be started over with tapi_nptcp_start().
Parameters:
app |
NPtcp app handle. |
Returns:
Status code.
te_errno tapi_nptcp_destroy(tapi_nptcp_app* app)
Destroy NPtcp job running on receiver’s side.
Parameters:
app |
NPtcp app handle. |
Returns:
Status code.
void tapi_nptcp_report_mi_log(te_mi_logger* logger, te_vec* report)
Add NPtcp report to MI logger.
Parameters:
logger |
MI logger entity. |
report |
NPtcp report. |