|  |  |  | libnm-util Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#include <nm-setting-bond.h> #define NM_SETTING_BOND_SETTING_NAME enum NMSettingBondError; #define NM_SETTING_BOND_ERROR GQuark nm_setting_bond_error_quark (void); #define NM_SETTING_BOND_INTERFACE_NAME #define NM_SETTING_BOND_OPTIONS #define NM_SETTING_BOND_OPTION_MODE #define NM_SETTING_BOND_OPTION_MIIMON #define NM_SETTING_BOND_OPTION_DOWNDELAY #define NM_SETTING_BOND_OPTION_UPDELAY #define NM_SETTING_BOND_OPTION_ARP_INTERVAL #define NM_SETTING_BOND_OPTION_ARP_IP_TARGET NMSettingBond; NMSettingBondClass; NMSetting * nm_setting_bond_new (void); const char * nm_setting_bond_get_interface_name (NMSettingBond *setting); guint32 nm_setting_bond_get_num_options (NMSettingBond *setting); gboolean nm_setting_bond_get_option (NMSettingBond *setting,guint32 idx,const char **out_name,const char **out_value); const char * nm_setting_bond_get_option_by_name (NMSettingBond *setting,const char *name); gboolean nm_setting_bond_add_option (NMSettingBond *setting,const char *name,const char *value); gboolean nm_setting_bond_remove_option (NMSettingBond *setting,const char *name); const char ** nm_setting_bond_get_valid_options (NMSettingBond *setting); const char * nm_setting_bond_get_option_default (NMSettingBond *setting,const char *name);
"interface-name" gchar* : Read / Write "options" GHashTable_gchararray+gchararray_* : Read / Write
The NMSettingBond object is a NMSetting subclass that describes properties necessary for bond connections.
typedef enum {
	NM_SETTING_BOND_ERROR_UNKNOWN = 0,      /*< nick=UnknownError >*/
	NM_SETTING_BOND_ERROR_INVALID_PROPERTY, /*< nick=InvalidProperty >*/
	NM_SETTING_BOND_ERROR_MISSING_PROPERTY, /*< nick=MissingProperty >*/
	NM_SETTING_BOND_ERROR_INVALID_OPTION,   /*< nick=InvalidOption >*/
	NM_SETTING_BOND_ERROR_MISSING_OPTION,   /*< nick=MissingOption >*/
} NMSettingBondError;
GQuark              nm_setting_bond_error_quark         (void);
Registers an error quark for NMSettingBond if necessary.
| Returns : | the error quark used for NMSettingBond errors. | 
typedef struct {
	NMSettingClass parent;
	/* Padding for future expansion */
	void (*_reserved1) (void);
	void (*_reserved2) (void);
	void (*_reserved3) (void);
	void (*_reserved4) (void);
} NMSettingBondClass;
NMSetting *         nm_setting_bond_new                 (void);
Creates a new NMSettingBond object with default values.
| Returns : | the new empty NMSettingBond object. [transfer full] | 
const char *        nm_setting_bond_get_interface_name  (NMSettingBond *setting);
| 
 | the NMSettingBond | 
| Returns : | the "interface-name" property of the setting | 
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().
| 
 | the NMSettingBond | 
| Returns : | the number of bonding options | 
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.
| 
 | the NMSettingBond | 
| 
 | index of the desired option, from 0 to nm_setting_bond_get_num_options()- 1 | 
| 
 | on return, the name of the bonding option; this value is owned by the setting and should not be modified. [out] | 
| 
 | on return, the value of the name of the bonding option; this value is owned by the setting and should not be modified. [out] | 
| Returns : | TRUEon success if the index was valid and an option was found,FALSEif the index was invalid (ie, greater than the number of options
currently held by the setting) | 
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.
| 
 | the NMSettingBond | 
| 
 | the option name for which to retrieve the value | 
| Returns : | the value, or NULLif the key/value pair was never added to the
setting; the value is owned by the setting and must not be modified | 
gboolean nm_setting_bond_add_option (NMSettingBond *setting,const char *name,const char *value);
Add an option to the table. The option is compared to an internal list of allowed options. Option names may contain only alphanumeric characters (ie [a-zA-Z0-9]). Adding a new name replaces any existing name/value pair that may already exist.
| 
 | the NMSettingBond | 
| 
 | name for the option | 
| 
 | value for the option | 
| Returns : | TRUEif the option was valid and was added to the internal option
list,FALSEif it was not. | 
gboolean nm_setting_bond_remove_option (NMSettingBond *setting,const char *name);
Remove the bonding option referenced by name from the internal option
list.
| 
 | the NMSettingBond | 
| 
 | name of the option to remove | 
| Returns : | TRUEif the option was found and removed from the internal option
list,FALSEif it was not. | 
const char **       nm_setting_bond_get_valid_options   (NMSettingBond *setting);
Returns a list of valid bond options.
| 
 | the NMSettingBond | 
| Returns : | a NULL-terminated array of strings of valid bond options. [transfer none] | 
const char * nm_setting_bond_get_option_default (NMSettingBond *setting,const char *name);
| 
 | the NMSettingBond | 
| 
 | the name of the option | 
| Returns : | the value of the bond option if not overridden by an entry in the "options" property. | 
"interface-name" property"interface-name" gchar* : Read / Write
The name of the virtual in-kernel bonding network interface
Default value: NULL