Re: [PATCH 2/8] bonding: Add nm_connection_get_iface_name() to abstract kernel interface binding
- From: Thomas Graf <tgraf redhat com>
- To: Dan Williams <dcbw redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: [PATCH 2/8] bonding: Add nm_connection_get_iface_name() to abstract kernel interface binding
- Date: Tue, 22 Nov 2011 09:56:42 +0100
On Mon, 2011-11-21 at 18:24 -0600, Dan Williams wrote:
> Would you mind renaming this to nm_connection_get_virtual_iface_name()
> instead? To make it clear that this interface name is only used for
> virtual interfaces and is not relevant for base types that have backing
> hardware.
> Also the ideal implementation here would actually grab the "base
> setting" for the connection and ask it for it's virtual iface name, ie:
>
> const char *
> nm_connection_get_virtual_iface_name (NMConnection *connection)
> {
> NMSettingConnection *s_con;
> NMSetting *base;
>
> g_return_val_if_fail (connection != NULL, NULL);
>
> s_con = nm_connection_get_setting_connection (connection);
> base = nm_connection_get_setting_by_name (connection, nm_setting_connection_get_connection_type (s_con));
> g_return_val_if_fail (base != NULL, NULL);
>
> return nm_setting_get_virtual_iface_name (base);
> }
OK, I am fine with that.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]