TAPI to manage dnsperf tool
Overview
TAPI to manage dnsperf. More…
// typedefs typedef struct tapi_dnsperf_app tapi_dnsperf_app; typedef struct tapi_dnsperf_report tapi_dnsperf_report; typedef enum tapi_dnsperf_addr_family tapi_dnsperf_addr_family; typedef enum tapi_dnsperf_transport_mode tapi_dnsperf_transport_mode; typedef struct tapi_dnsperf_opt tapi_dnsperf_opt; // enums enum tapi_dnsperf_addr_family; enum tapi_dnsperf_transport_mode; // structs struct tapi_dnsperf_app; struct tapi_dnsperf_opt; struct tapi_dnsperf_report; // global variables const tapi_dnsperf_opt tapi_dnsperf_default_opt; // global functions void tapi_dnsperf_opt_query_add_a(tapi_dnsperf_opt* opt, const char* host); void tapi_dnsperf_opt_query_add_aaaa(tapi_dnsperf_opt* opt, const char* host); void tapi_dnsperf_opt_queries_free(tapi_dnsperf_opt* opt); te_errno tapi_dnsperf_create(tapi_job_factory_t* factory, tapi_dnsperf_opt* opt, tapi_dnsperf_app** app); te_errno tapi_dnsperf_start(const tapi_dnsperf_app* app); te_errno tapi_dnsperf_wait(const tapi_dnsperf_app* app, int timeout_ms); te_errno tapi_dnsperf_stop(const tapi_dnsperf_app* app); te_errno tapi_dnsperf_kill(const tapi_dnsperf_app* app, int signum); te_errno tapi_dnsperf_destroy(tapi_dnsperf_app* app); te_errno tapi_dnsperf_get_report(tapi_dnsperf_app* app, tapi_dnsperf_report* report); te_errno tapi_dnsperf_report_mi_log(const tapi_dnsperf_report* report); void tapi_dnsperf_destroy_report(tapi_dnsperf_report* report);
Detailed Documentation
TAPI to manage dnsperf.
Typedefs
typedef struct tapi_dnsperf_app tapi_dnsperf_app
dnsperf tool information.
typedef struct tapi_dnsperf_report tapi_dnsperf_report
dnsperf information from the stdout.
typedef enum tapi_dnsperf_addr_family tapi_dnsperf_addr_family
Representation of possible values for dnsperf family option.
typedef enum tapi_dnsperf_transport_mode tapi_dnsperf_transport_mode
Representation of possible values for dnsperf mode option.
typedef struct tapi_dnsperf_opt tapi_dnsperf_opt
dnsperf specific options.
Global Variables
const tapi_dnsperf_opt tapi_dnsperf_default_opt
Default dnsperf options initializer.
Global Functions
void tapi_dnsperf_opt_query_add_a(tapi_dnsperf_opt* opt, const char* host)
Add new DNS query with A
type.
Parameters:
opt |
dnsperf options |
host |
host name |
void tapi_dnsperf_opt_query_add_aaaa(tapi_dnsperf_opt* opt, const char* host)
Add new DNS query with AAAA
type.
Parameters:
opt |
dnsperf options |
host |
host name |
void tapi_dnsperf_opt_queries_free(tapi_dnsperf_opt* opt)
Release memory used by queries.
Parameters:
opt |
dnsperf options |
te_errno tapi_dnsperf_create(tapi_job_factory_t* factory, tapi_dnsperf_opt* opt, tapi_dnsperf_app** app)
Create dnsperf app.
Parameters:
factory |
job factory |
opt |
dnsperf options |
app |
dnsperf app handle |
Returns:
Status code.
te_errno tapi_dnsperf_start(const tapi_dnsperf_app* app)
Start dnsperf.
Parameters:
app |
dnsperf app handle |
Returns:
Status code.
te_errno tapi_dnsperf_wait(const tapi_dnsperf_app* app, int timeout_ms)
Wait for dnsperf completion.
Parameters:
app |
dnsperf app handle |
timeout_ms |
wait timeout in milliseconds |
Returns:
Status code.
te_errno tapi_dnsperf_stop(const tapi_dnsperf_app* app)
Stop dnsperf. It can be started over with tapi_dnsperf_start().
Parameters:
app |
dnsperf app handle |
Returns:
Status code.
te_errno tapi_dnsperf_kill(const tapi_dnsperf_app* app, int signum)
Send a signal to dnsperf.
Parameters:
app |
dnsperf app handle |
signum |
signal to send |
Returns:
Status code.
te_errno tapi_dnsperf_destroy(tapi_dnsperf_app* app)
Destroy dnsperf.
Parameters:
app |
dnsperf app handle |
Returns:
Status code.
te_errno tapi_dnsperf_get_report(tapi_dnsperf_app* app, tapi_dnsperf_report* report)
Get dnsperf report.
Field ‘arguments’ in the report
is freed in extern te_errno tapi_dnsperf_destroy_report(…).
Parameters:
app |
dnsperf app handle |
report |
dnsperf statistics report |
te_errno tapi_dnsperf_report_mi_log(const tapi_dnsperf_report* report)
Add dnsperf report to MI logger.
Parameters:
report |
dnsperf statistics report |
Returns:
Status code.
void tapi_dnsperf_destroy_report(tapi_dnsperf_report* report)
Destroy dnsperf report to MI logger and freed memory.
Field ‘arguments’ in the report
is freed here.
Parameters:
report |
dnsperf statistics report |