Top |
Functions
NMSetting * | nm_setting_bond_new () |
guint32 | nm_setting_bond_get_num_options () |
gboolean | nm_setting_bond_get_option () |
const char * | nm_setting_bond_get_option_by_name () |
gboolean | nm_setting_bond_add_option () |
gboolean | nm_setting_bond_remove_option () |
gboolean | nm_setting_bond_validate_option () |
const char ** | nm_setting_bond_get_valid_options () |
const char * | nm_setting_bond_get_option_default () |
const char * | nm_setting_bond_get_option_normalized () |
Types and Values
Description
The NMSettingBond object is a NMSetting subclass that describes properties necessary for bond connections.
Functions
nm_setting_bond_new ()
NMSetting *
nm_setting_bond_new (void
);
Creates a new NMSettingBond object with default values.
nm_setting_bond_get_num_options ()
guint32
nm_setting_bond_get_num_options (NMSettingBond *setting
);
Returns the number of options that should be set for this bond when it
is activated. This can be used to retrieve each option individually
using nm_setting_bond_get_option()
.
nm_setting_bond_get_option ()
gboolean nm_setting_bond_get_option (NMSettingBond *setting
,guint32 idx
,const char **out_name
,const char **out_value
);
Given an index, return the value of the bonding option at that index. Indexes
are *not* guaranteed to be static across modifications to options done by
nm_setting_bond_add_option()
and nm_setting_bond_remove_option()
,
and should not be used to refer to options except for short periods of time
such as during option iteration.
Parameters
setting |
the NMSettingBond |
|
idx |
index of the desired option, from 0 to
|
|
out_name |
on return, the name of the bonding option; this value is owned by the setting and should not be modified. |
[out][transfer none] |
out_value |
on return, the value of the name of the bonding option; this value is owned by the setting and should not be modified. |
[out][transfer none] |
nm_setting_bond_get_option_by_name ()
const char * nm_setting_bond_get_option_by_name (NMSettingBond *setting
,const char *name
);
Returns the value associated with the bonding option specified by
name
, if it exists.
Returns
the value, or NULL
if the key/value pair was never added to the
setting; the value is owned by the setting and must not be modified
nm_setting_bond_add_option ()
gboolean nm_setting_bond_add_option (NMSettingBond *setting
,const char *name
,const char *value
);
Add an option to the table. Adding a new name replaces any existing name/value pair that may already exist.
Returns
returns FALSE
if either name
or value
is NULL
, in that case
the option is not set. Otherwise, the function does not fail and does not validate
the arguments. All validation happens via nm_connection_verify()
or do basic validation
yourself with nm_setting_bond_validate_option()
.
Note: Before 1.30, libnm would perform basic validation of the name and the value
via nm_setting_bond_validate_option()
and reject the request by returning FALSE.
Since 1.30, libnm no longer rejects any values as the setter is not supposed
to perform validation.
nm_setting_bond_remove_option ()
gboolean nm_setting_bond_remove_option (NMSettingBond *setting
,const char *name
);
Remove the bonding option referenced by name
from the internal option
list.
nm_setting_bond_validate_option ()
gboolean nm_setting_bond_validate_option (const char *name
,const char *value
);
Checks whether name
is a valid bond option and value
is a valid value for
the name
. If value
is NULL
, the function only validates the option name.
nm_setting_bond_get_valid_options ()
const char **
nm_setting_bond_get_valid_options (NMSettingBond *setting
);
Returns a list of valid bond options.
The setting
argument is unused and may be passed as NULL
.
nm_setting_bond_get_option_default ()
const char * nm_setting_bond_get_option_default (NMSettingBond *setting
,const char *name
);
nm_setting_bond_get_option_normalized ()
const char * nm_setting_bond_get_option_normalized (NMSettingBond *setting
,const char *name
);
Returns
the value of the bond option after normalization, which is what NetworkManager
will actually apply when activating the connection. NULL
if the option won't be applied
to the connection.
Since: 1.24
Types and Values
NM_SETTING_BOND_OPTION_PRIMARY_RESELECT
#define NM_SETTING_BOND_OPTION_PRIMARY_RESELECT "primary_reselect"
NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY
#define NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY "xmit_hash_policy"
NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO
#define NM_SETTING_BOND_OPTION_AD_ACTOR_SYS_PRIO "ad_actor_sys_prio"
NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM
#define NM_SETTING_BOND_OPTION_AD_ACTOR_SYSTEM "ad_actor_system"
NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY
#define NM_SETTING_BOND_OPTION_AD_USER_PORT_KEY "ad_user_port_key"
NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE
#define NM_SETTING_BOND_OPTION_ALL_SLAVES_ACTIVE "all_slaves_active"
NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS
#define NM_SETTING_BOND_OPTION_ARP_ALL_TARGETS "arp_all_targets"
NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE
#define NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE "packets_per_slave"
NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB
#define NM_SETTING_BOND_OPTION_TLB_DYNAMIC_LB "tlb_dynamic_lb"