Network interface configuration TAPI
Overview
Copyright (C) 2004-2022 OKTET Labs Ltd. More…
// enums enum tapi_netif_msg_level; // global functions te_errno tapi_cfg_if_feature_is_readonly(const char* ta, const char* ifname, const char* feature_name, bool* readonly); te_errno tapi_cfg_if_feature_is_present(const char* ta, const char* ifname, const char* feature_name, bool* present); te_errno tapi_cfg_if_feature_get(const char* ta, const char* ifname, const char* feature_name, int* feature_value_out); te_errno tapi_cfg_if_feature_set(const char* ta, const char* ifname, const char* feature_name, int feature_value); te_errno tapi_cfg_if_feature_set_all_parents(const char* ta, const char* ifname, const char* feature_name, int feature_value); te_errno tapi_cfg_if_deviceinfo_drivername_get(const char* ta, const char* ifname, char** drivername); te_errno tapi_cfg_if_deviceinfo_driverversion_get(const char* ta, const char* ifname, char** driverversion); te_errno tapi_cfg_if_deviceinfo_firmwareversion_get(const char* ta, const char* ifname, char** firmwareversion); te_errno tapi_cfg_if_gro_get(const char* ta, const char* ifname, int* gro); te_errno tapi_cfg_if_gso_get(const char* ta, const char* ifname, int* gso); te_errno tapi_cfg_if_tso_get(const char* ta, const char* ifname, int* tso); te_errno tapi_cfg_if_flags_get(const char* ta, const char* ifname, int* flags); te_errno tapi_cfg_if_get_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t* ring_size); te_errno tapi_cfg_if_get_max_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t* max_ring_size); te_errno tapi_cfg_if_gro_set(const char* ta, const char* ifname, int gro); te_errno tapi_cfg_if_gso_set(const char* ta, const char* ifname, int gso); te_errno tapi_cfg_if_tso_set(const char* ta, const char* ifname, int tso); te_errno tapi_cfg_if_flags_set(const char* ta, const char* ifname, int flags); te_errno tapi_cfg_if_set_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t ring_size); te_errno tapi_cfg_if_set_ring_size_to_max(const char* ta, const char* ifname, bool is_rx, int64_t* ring_size); te_errno tapi_cfg_if_reset(const char* ta, const char* ifname); te_errno tapi_cfg_if_msglvl_get(const char* ta, const char* ifname, uint64_t* msglvl); te_errno tapi_cfg_if_msglvl_set(const char* ta, const char* ifname, uint64_t msglvl); te_errno tapi_cfg_if_priv_flag_get(const char* ta, const char* if_name, const char* flag_name, bool* state); te_errno tapi_cfg_if_priv_flag_set(const char* ta, const char* if_name, const char* flag_name, bool state); // macros #define TAPI_NETIF_MSG_ALL
Detailed Documentation
Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.
Global Functions
te_errno tapi_cfg_if_feature_is_readonly(const char* ta, const char* ifname, const char* feature_name, bool* readonly)
Check whether a given interface feature is read-only
Parameters:
ta |
Test agent name |
ifname |
Interface name |
feature_name |
Feature name |
readonly |
Will be set to |
Returns:
Status code
te_errno tapi_cfg_if_feature_is_present(const char* ta, const char* ifname, const char* feature_name, bool* present)
Check whether a given interface feature is present
Parameters:
ta |
Test agent name |
ifname |
Interface name |
feature_name |
Feature name |
present |
Will be set to |
Returns:
Status code
te_errno tapi_cfg_if_feature_get(const char* ta, const char* ifname, const char* feature_name, int* feature_value_out)
Get feature value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
feature_name |
Feature name |
feature_value_out |
Location for the value |
Returns:
Status code
te_errno tapi_cfg_if_feature_set(const char* ta, const char* ifname, const char* feature_name, int feature_value)
Set feature value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
feature_name |
Feature name |
feature_value |
Location for the value |
Returns:
Status code
te_errno tapi_cfg_if_feature_set_all_parents(const char* ta, const char* ifname, const char* feature_name, int feature_value)
Set feature value of an ethernet interface and all its parents if they are. Ignore EOPNOTSUPP
failures and failures to change read-only feature if requested changing was successful at least for one interface.
Parameters:
ta |
Test agent name |
ifname |
Interface name |
feature_name |
Feature name |
feature_value |
Location for the value |
Returns:
Status code
te_errno tapi_cfg_if_deviceinfo_drivername_get(const char* ta, const char* ifname, char** drivername)
Get driver name of a network interface.
Parameters:
ta |
Test agent name |
ifname |
Interface name |
drivername |
Driver name, obtained value should be released if not required anymore. |
Returns:
Status code
te_errno tapi_cfg_if_deviceinfo_driverversion_get(const char* ta, const char* ifname, char** driverversion)
Get driver version of a network interface.
Parameters:
ta |
Test agent name |
ifname |
Interface name |
driverversion |
Driver version, obtained value should be released if not required anymore. |
Returns:
Status code
te_errno tapi_cfg_if_deviceinfo_firmwareversion_get(const char* ta, const char* ifname, char** firmwareversion)
Get firmware version of a network interface.
Parameters:
ta |
Test agent name |
ifname |
Interface name |
firmwareversion |
Firmware version, obtained value should be released if not required anymore. |
Returns:
Status code
te_errno tapi_cfg_if_gro_get(const char* ta, const char* ifname, int* gro)
Get GRO value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
gro |
Location for the GRO value |
Returns:
Status code
te_errno tapi_cfg_if_gso_get(const char* ta, const char* ifname, int* gso)
Get GSO value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
gso |
Location for the GSO value |
Returns:
Status code
te_errno tapi_cfg_if_tso_get(const char* ta, const char* ifname, int* tso)
Get TSO value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
tso |
The TSO value location |
Returns:
Status code
te_errno tapi_cfg_if_flags_get(const char* ta, const char* ifname, int* flags)
Get flags value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
flags |
Location for the eth flags |
Returns:
Status code
te_errno tapi_cfg_if_get_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t* ring_size)
Get network interface Rx or Tx ring size
Parameters:
is_rx |
Rx or Tx option |
ta |
Test agent name |
ifname |
Interface name |
ring_size |
Location for the ring size |
Returns:
Status code
te_errno tapi_cfg_if_get_max_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t* max_ring_size)
Get network interface Rx or Tx preset maximum ring size
Parameters:
is_rx |
Rx or Tx option |
ta |
Test agent name |
ifname |
Interface name |
max_ring_size |
Location for the ring size |
Returns:
Status code
te_errno tapi_cfg_if_gro_set(const char* ta, const char* ifname, int gro)
Set GRO value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
gro |
A new GRO value |
Returns:
Status code
te_errno tapi_cfg_if_gso_set(const char* ta, const char* ifname, int gso)
Set GSO value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
gso |
A new GSO value |
Returns:
Status code
te_errno tapi_cfg_if_tso_set(const char* ta, const char* ifname, int tso)
Set TSO value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
tso |
The TSO value |
Returns:
Status code
te_errno tapi_cfg_if_flags_set(const char* ta, const char* ifname, int flags)
Set flags value of an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
flags |
A new eth flags value |
Returns:
Status code
te_errno tapi_cfg_if_set_ring_size(const char* ta, const char* ifname, bool is_rx, int64_t ring_size)
Set network interface Rx or Tx ring size
Parameters:
is_rx |
Rx or Tx option |
ta |
Test agent name |
ifname |
Interface name |
ring_size |
New ring size to set |
Returns:
Status code
te_errno tapi_cfg_if_set_ring_size_to_max(const char* ta, const char* ifname, bool is_rx, int64_t* ring_size)
Set network interface Rx or Tx ring size to its maximum
Parameters:
is_rx |
Rx or Tx option |
ta |
Test agent name |
ifname |
Interface name |
ring_size |
Optional location for effective ring size |
Returns:
Status code
te_errno tapi_cfg_if_reset(const char* ta, const char* ifname)
Reset an ethernet interface
Parameters:
ta |
Test agent name |
ifname |
Interface name |
Returns:
Status code
te_errno tapi_cfg_if_msglvl_get(const char* ta, const char* ifname, uint64_t* msglvl)
Get current network interface driver message level.
Parameters:
ta |
Test Agent name |
ifname |
Interface name |
msglvl |
Where to save driver message level (see tapi_netif_msg_level) |
Returns:
Status code.
te_errno tapi_cfg_if_msglvl_set(const char* ta, const char* ifname, uint64_t msglvl)
Set current network interface driver message level.
Parameters:
ta |
Test Agent name |
ifname |
Interface name |
msglvl |
Driver message level to set (see te_netif_msg_level) |
Returns:
Status code.
te_errno tapi_cfg_if_priv_flag_get(const char* ta, const char* if_name, const char* flag_name, bool* state)
Get status of a private flag for a network interface.
Parameters:
ta |
Test agent name |
if_name |
Interface name |
flag_name |
Name of the flag |
state |
Will be set to |
Returns:
Status code.
te_errno tapi_cfg_if_priv_flag_set(const char* ta, const char* if_name, const char* flag_name, bool state)
Set status of a private flag for a network interface.
Parameters:
ta |
Test agent name |
if_name |
Interface name |
flag_name |
Name of the flag |
state |
|
Returns:
Status code.
Macros
#define TAPI_NETIF_MSG_ALL
All flags from te_netif_msg_level