diff options
author | Thomas Graf <tgraf@redhat.com> | 2011-12-07 13:15:18 +0100 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-12-08 09:56:47 -0600 |
commit | 1cd8d520611915136f5e3e95f64e823f7cbf3b49 (patch) | |
tree | 705150ba598700cfc02cc12e104ca969da54089c /libnm-util/nm-setting-bond.c | |
parent | b366ebe32157bc4f9b183e49534d3531f72872a0 (diff) | |
download | NetworkManager-1cd8d520611915136f5e3e95f64e823f7cbf3b49.tar.gz |
bonding: add nm_connection_get_virtual_iface_name() to abstract kernel interface binding
Some connection types such as bonding, bridging and VLAN require
specific virtual kernel interfaces identified by name to be auto
connected to the connection.
The function nm_connection_get_virtual_iface_name() returns the name
of the kernel interface if the connection type requires this
functionatlity.
Each connection base type settings class can implement the function
get_virtual_iface_name() if the connection needs to be auto connected
to a specific kernel interface.
Signed-off-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'libnm-util/nm-setting-bond.c')
-rw-r--r-- | libnm-util/nm-setting-bond.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libnm-util/nm-setting-bond.c b/libnm-util/nm-setting-bond.c index 582e1f9668..3aa9cf3d92 100644 --- a/libnm-util/nm-setting-bond.c +++ b/libnm-util/nm-setting-bond.c @@ -287,6 +287,14 @@ verify (NMSetting *setting, GSList *all_settings, GError **error) return TRUE; } +static const char * +get_virtual_iface_name (NMSetting *setting) +{ + NMSettingBond *self = NM_SETTING_BOND (setting); + + return nm_setting_bond_get_interface_name (self); +} + static void nm_setting_bond_init (NMSettingBond *setting) { @@ -389,6 +397,7 @@ nm_setting_bond_class_init (NMSettingBondClass *setting_class) object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; + parent_class->get_virtual_iface_name = get_virtual_iface_name; /* Properties */ /** |