System parameters configuration

Overview

Definitions of TAPI to get/set system parameters using /agent/sys/ Configurator subtree (doc/cm/cm_base.xml). More…

// typedefs

typedef te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno enum tapi_cfg_sys_ip_net_subtree tapi_cfg_sys_ip_net_subtree;
typedef enum tapi_cfg_sys_ip_instance_kind tapi_cfg_sys_ip_instance_kind;

// enums

enum tapi_cfg_sys_ip_instance_kind;
enum tapi_cfg_sys_ip_net_subtree;

// global functions

te_errno tapi_cfg_sys_get_int(const char* ta, int* val, const char* fmt, ...);
te_errno te_errno tapi_cfg_sys_set_int(const char* ta, int val, int* old_val, const char* fmt, ...);
te_errno te_errno te_errno tapi_cfg_sys_get_uint64(const char* ta, uint64_t* val, const char* fmt, ...);
te_errno te_errno te_errno te_errno tapi_cfg_sys_set_uint64(const char* ta, uint64_t val, uint64_t* old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_get_str(const char* ta, char** val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_set_str(const char* ta, const char* val, char** old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_int(const char* ta, int* val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_int(const char* ta, int val, int* old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_uint64(const char* ta, uint64_t* val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_uint64(const char* ta, uint64_t val, uint64_t* old_val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_str(const char* ta, char** val, const char* fmt, ...);
te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_str(const char* ta, const char* val, char** old_val, const char* fmt, ...);
te_errno tapi_cfg_sys_ip_grab(const char* ta, int af, tapi_cfg_sys_ip_net_subtree subtree, tapi_cfg_sys_ip_instance_kind inst, cs_rsrc_lock_type lock_type);

Detailed Documentation

Definitions of TAPI to get/set system parameters using /agent/sys/ Configurator subtree (doc/cm/cm_base.xml).

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

Typedefs

typedef te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno enum tapi_cfg_sys_ip_net_subtree tapi_cfg_sys_ip_net_subtree

Sysctl subtrees under /net/ipv4 and /net/ipv6.

typedef enum tapi_cfg_sys_ip_instance_kind tapi_cfg_sys_ip_instance_kind

Specific instance inside a sysctl subtree.

Global Functions

te_errno tapi_cfg_sys_get_int(const char* ta, int* val, const char* fmt, ...)

Get value of integer parameter in /sys: subtree.

Parameters:

ta

Test agent name.

val

Where to save value.

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno tapi_cfg_sys_set_int(const char* ta, int val, int* old_val, const char* fmt, ...)

Set value of integer parameter in /sys: subtree.

Parameters:

ta

Test agent name.

val

Value to set.

old_val

Where to save previous value (may be NULL).

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno te_errno tapi_cfg_sys_get_uint64(const char* ta, uint64_t* val, const char* fmt, ...)

Get value of uint64_t parameter in /sys: subtree.

Parameters:

ta

Test agent name.

val

Where to save value.

fmt

Format string of the path.

Format arguments.

Returns:

Status code.

te_errno te_errno te_errno te_errno tapi_cfg_sys_set_uint64(const char* ta, uint64_t val, uint64_t* old_val, const char* fmt, ...)

Set value of uint64_t parameter in /sys: subtree.

Parameters:

ta

Test agent name.

val

Value to set.

old_val

Where to save previous value (may be NULL).

fmt

Format string of the path.

Format arguments.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_get_str(const char* ta, char** val, const char* fmt, ...)

Get value of string parameter in /sys: subtree.

Parameters:

ta

Test agent name.

val

Where to save pointer to allocated string containing requested value.

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_set_str(const char* ta, const char* val, char** old_val, const char* fmt, ...)

Set value of string parameter in /sys: subtree.

Parameters:

ta

Test agent name.

val

Value to set.

old_val

Where to save pointer to allocated string containing the previous value (may be NULL).

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_int(const char* ta, int* val, const char* fmt, ...)

The same as tapi_cfg_sys_get_int() but try to get the option value in default net namespace if it does not exist in current namespace.

Parameters:

ta

Test agent name.

val

Where to save value.

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_int(const char* ta, int val, int* old_val, const char* fmt, ...)

The same as tapi_cfg_sys_set_int() but try to set the option value in default net namespace if it does not exist in current namespace.

Parameters:

ta

Test agent name.

val

Value to set.

old_val

Where to save previous value (may be NULL).

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_uint64(const char* ta, uint64_t* val, const char* fmt, ...)

The same as tapi_cfg_sys_get_uint64() but try to get the option value in default net namespace if it does not exist in current namespace.

Parameters:

ta

Test agent name.

val

Where to save value.

fmt

Format string of the path.

Format arguments.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_uint64(const char* ta, uint64_t val, uint64_t* old_val, const char* fmt, ...)

The same as tapi_cfg_sys_set_uint64() but try to set the option value in default net namespace if it does not exist in current namespace.

Parameters:

ta

Test agent name.

val

Value to set.

old_val

Where to save previous value (may be NULL).

fmt

Format string of the path.

Format arguments.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_get_str(const char* ta, char** val, const char* fmt, ...)

The same as tapi_cfg_sys_get_str() but try to get the option value in default net namespace if it does not exist in current namespace.

Parameters:

ta

Test agent name.

val

Where to save pointer to allocated string containing requested value.

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno te_errno tapi_cfg_sys_ns_set_str(const char* ta, const char* val, char** old_val, const char* fmt, ...)

The same as tapi_cfg_sys_set_str() but try to set the option value in default net namespace if it does not exist in current namespace.

Parameters:

ta

Test agent name.

val

Value to set.

old_val

Where to save pointer to allocated string containing the previous value (may be NULL).

fmt

Format string of the path.

List of arguments for format string.

Returns:

Status code.

te_errno tapi_cfg_sys_ip_grab(const char* ta, int af, tapi_cfg_sys_ip_net_subtree subtree, tapi_cfg_sys_ip_instance_kind inst, cs_rsrc_lock_type lock_type)

Acquire a Configurator resource associated with an IP-related sysctl subtree.

The resource is managed by the Configurator framework and is released automatically during configuration cleanup.

Parameters:

ta

Test agent name.

af

Address family.

subtree

Sysctl subtree.

inst

Target instance.

shared

Lock type.

Returns:

Status code.