ping tool TAPI (tapi_ping)

Overview

TAPI to handle ping tool. More…

// typedefs

typedef struct tapi_ping_opt tapi_ping_opt;
typedef struct tapi_ping_rtt_stats tapi_ping_rtt_stats;
typedef struct tapi_ping_report tapi_ping_report;
typedef struct tapi_ping_app tapi_ping_app;

// structs

struct tapi_ping_opt;
struct tapi_ping_report;
struct tapi_ping_rtt_stats;

// global variables

const tapi_ping_opt tapi_ping_default_opt;

// global functions

te_errno tapi_ping_create(tapi_job_factory_t* factory, const tapi_ping_opt* opt, tapi_ping_app** app);
te_errno tapi_ping_start(tapi_ping_app* app);
te_errno tapi_ping_wait(tapi_ping_app* app, int timeout_ms);
te_errno tapi_ping_kill(tapi_ping_app* app, int signum);
te_errno tapi_ping_stop(tapi_ping_app* app);
te_errno tapi_ping_destroy(tapi_ping_app* app);
te_errno tapi_ping_get_report(tapi_ping_app* app, tapi_ping_report* report);
void tapi_ping_report_mi_log(te_mi_logger* logger, tapi_ping_report* report);

Detailed Documentation

TAPI to handle ping tool.

Copyright (C) 2020-2022 OKTET Labs Ltd. All rights reserved.

Typedefs

typedef struct tapi_ping_opt tapi_ping_opt

ping tool specific command line options

typedef struct tapi_ping_report tapi_ping_report

Statistics report of ping tool

typedef struct tapi_ping_app tapi_ping_app

Information of a ping tool

Global Variables

const tapi_ping_opt tapi_ping_default_opt

Default options initializer

Global Functions

te_errno tapi_ping_create(tapi_job_factory_t* factory, const tapi_ping_opt* opt, tapi_ping_app** app)

Create ping app.

Parameters:

factory

Job factory

opt

ping tool options

app

ping app handle

Returns:

Status code

te_errno tapi_ping_start(tapi_ping_app* app)

Start ping tool.

Parameters:

app

ping app handle

Returns:

Status code

te_errno tapi_ping_wait(tapi_ping_app* app, int timeout_ms)

Wait for ping tool completion.

Parameters:

app

ping app handle

timeout_ms

Wait timeout in milliseconds

TE_EINPROGRESS

ping is still running

Returns:

Status code

te_errno tapi_ping_kill(tapi_ping_app* app, int signum)

Send a signal to ping tool.

Parameters:

app

ping app handle

signum

Signal to send

Returns:

Status code

te_errno tapi_ping_stop(tapi_ping_app* app)

Stop ping tool. It can be started over with tapi_ping_start().

Parameters:

app

ping app handle

TE_EPROTO

ping tool is stopped, but report is unavailable

Returns:

Status code

te_errno tapi_ping_destroy(tapi_ping_app* app)

Destroy ping app. The app cannot be used after calling this function.

Parameters:

app

ping app handle

Returns:

Status code

te_errno tapi_ping_get_report(tapi_ping_app* app, tapi_ping_report* report)

Get ping tool report.

Parameters:

app

ping app handle

report

ping report handle

Returns:

Status code

void tapi_ping_report_mi_log(te_mi_logger* logger, tapi_ping_report* report)

Add ping tool report to MI logger.

Parameters:

logger

MI logger entity

report

ping tool report