Network statistics access

Overview

// typedefs

typedef struct tapi_cfg_if_stats tapi_cfg_if_stats;
typedef struct tapi_cfg_net_stats_ipv4 tapi_cfg_net_stats_ipv4;
typedef struct tapi_cfg_net_stats_icmp tapi_cfg_net_stats_icmp;
typedef struct tapi_cfg_net_stats tapi_cfg_net_stats;

// structs

struct tapi_cfg_if_stats;
struct tapi_cfg_net_stats;
struct tapi_cfg_net_stats_icmp;
struct tapi_cfg_net_stats_ipv4;

// global functions

te_errno tapi_cfg_stats_if_stats_get(const char* ta, const char* ifname, tapi_cfg_if_stats* stats);
te_errno tapi_cfg_stats_if_stats_print(const char* ta, const char* ifname, tapi_cfg_if_stats* stats);
te_errno tapi_cfg_stats_net_stats_get(const char* ta, tapi_cfg_net_stats* stats);
te_errno tapi_cfg_stats_net_stats_print(const char* ta, tapi_cfg_net_stats* stats);

Detailed Documentation

Global Functions

te_errno tapi_cfg_stats_if_stats_get(const char* ta, const char* ifname, tapi_cfg_if_stats* stats)

Get IfTable statistics for the certain network interface.

Parameters:

ta

Test Agent to gather statistics on

ifname

Network interface to gather statistics of

stats

Resulted interface statistics structure

Returns:

Status code

te_errno tapi_cfg_stats_if_stats_print(const char* ta, const char* ifname, tapi_cfg_if_stats* stats)

Print IfTable statistics for the certain network interface.

Parameters:

ta

Test Agent to gather statistics on

ifname

Network interface to gather statistics of

stats

Gathered interface statistics structure to print

Returns:

Status code

te_errno tapi_cfg_stats_net_stats_get(const char* ta, tapi_cfg_net_stats* stats)

Get /proc/net/snmp like statistics for the host, where Test Agent is running.

Parameters:

ta

Test Agent to gather statistics on

stats

Resulted host statistics structure

Returns:

Status code

te_errno tapi_cfg_stats_net_stats_print(const char* ta, tapi_cfg_net_stats* stats)

Print /proc/net/snmp like statistics for the host, where Test Agent is running.

Parameters:

ta

Test Agent to gether statistics on

stats

Gathered host statistics structure to print

Returns:

Status code