mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
device-factory/trivial: rename get_virtual_iface_name() to get_connection_iface()
This commit is contained in:
parent
8c1a9bbb8c
commit
fd314ed7f7
8 changed files with 42 additions and 42 deletions
|
|
@ -158,9 +158,9 @@ nm_device_factory_get_connection_parent (NMDeviceFactory *factory,
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface)
|
const char *parent_iface)
|
||||||
{
|
{
|
||||||
const char *iface;
|
const char *iface;
|
||||||
|
|
||||||
|
|
@ -173,10 +173,10 @@ get_virtual_iface_name (NMDeviceFactory *factory,
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
nm_device_factory_get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface,
|
const char *parent_iface,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
char *ifname;
|
char *ifname;
|
||||||
|
|
||||||
|
|
@ -193,7 +193,7 @@ nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_virtual_iface_name) {
|
if (!NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_connection_iface) {
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
NM_MANAGER_ERROR,
|
NM_MANAGER_ERROR,
|
||||||
NM_MANAGER_ERROR_FAILED,
|
NM_MANAGER_ERROR_FAILED,
|
||||||
|
|
@ -202,7 +202,7 @@ nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ifname = NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_virtual_iface_name (factory, connection, parent_iface);
|
ifname = NM_DEVICE_FACTORY_GET_INTERFACE (factory)->get_connection_iface (factory, connection, parent_iface);
|
||||||
if (!ifname) {
|
if (!ifname) {
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
NM_MANAGER_ERROR,
|
NM_MANAGER_ERROR,
|
||||||
|
|
@ -230,7 +230,7 @@ nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
||||||
static void
|
static void
|
||||||
nm_device_factory_default_init (NMDeviceFactoryInterface *factory_iface)
|
nm_device_factory_default_init (NMDeviceFactoryInterface *factory_iface)
|
||||||
{
|
{
|
||||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
factory_iface->get_connection_iface = get_connection_iface;
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
signals[DEVICE_ADDED] = g_signal_new (NM_DEVICE_FACTORY_DEVICE_ADDED,
|
signals[DEVICE_ADDED] = g_signal_new (NM_DEVICE_FACTORY_DEVICE_ADDED,
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ typedef struct {
|
||||||
NMConnection *connection);
|
NMConnection *connection);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_virtual_iface_name:
|
* get_connection_iface:
|
||||||
* @factory: the #NMDeviceFactory
|
* @factory: the #NMDeviceFactory
|
||||||
* @connection: the #NMConnection to return the virtual interface name for
|
* @connection: the #NMConnection to return the virtual interface name for
|
||||||
* @parent_iface: parent interface name
|
* @parent_iface: parent interface name
|
||||||
|
|
@ -111,9 +111,9 @@ typedef struct {
|
||||||
*
|
*
|
||||||
* Returns: the interface name, or %NULL
|
* Returns: the interface name, or %NULL
|
||||||
*/
|
*/
|
||||||
char * (*get_virtual_iface_name) (NMDeviceFactory *factory,
|
char * (*get_connection_iface) (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface);
|
const char *parent_iface);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* create_device:
|
* create_device:
|
||||||
|
|
@ -175,10 +175,10 @@ void nm_device_factory_get_supported_types (NMDeviceFactory *factory,
|
||||||
const char *nm_device_factory_get_connection_parent (NMDeviceFactory *factory,
|
const char *nm_device_factory_get_connection_parent (NMDeviceFactory *factory,
|
||||||
NMConnection *connection);
|
NMConnection *connection);
|
||||||
|
|
||||||
char * nm_device_factory_get_virtual_iface_name (NMDeviceFactory *factory,
|
char * nm_device_factory_get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface,
|
const char *parent_iface,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
void nm_device_factory_start (NMDeviceFactory *factory);
|
void nm_device_factory_start (NMDeviceFactory *factory);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -399,9 +399,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface)
|
const char *parent_iface)
|
||||||
{
|
{
|
||||||
NMSettingInfiniband *s_infiniband;
|
NMSettingInfiniband *s_infiniband;
|
||||||
|
|
||||||
|
|
@ -423,6 +423,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (INFINIBAND, Infiniband, infiniband,
|
||||||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_INFINIBAND_SETTING_NAME),
|
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_INFINIBAND_SETTING_NAME),
|
||||||
factory_iface->create_device = create_device;
|
factory_iface->create_device = create_device;
|
||||||
factory_iface->get_connection_parent = get_connection_parent;
|
factory_iface->get_connection_parent = get_connection_parent;
|
||||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
factory_iface->get_connection_iface = get_connection_iface;
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1023,9 +1023,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface)
|
const char *parent_iface)
|
||||||
{
|
{
|
||||||
const char *ifname;
|
const char *ifname;
|
||||||
NMSettingIPTunnel *s_ip_tunnel;
|
NMSettingIPTunnel *s_ip_tunnel;
|
||||||
|
|
@ -1048,5 +1048,5 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (IP_TUNNEL, IPTunnel, ip_tunnel,
|
||||||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_IP_TUNNEL_SETTING_NAME),
|
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_IP_TUNNEL_SETTING_NAME),
|
||||||
factory_iface->create_device = create_device;
|
factory_iface->create_device = create_device;
|
||||||
factory_iface->get_connection_parent = get_connection_parent;
|
factory_iface->get_connection_parent = get_connection_parent;
|
||||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
factory_iface->get_connection_iface = get_connection_iface;
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -744,9 +744,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface)
|
const char *parent_iface)
|
||||||
{
|
{
|
||||||
NMSettingMacvlan *s_macvlan;
|
NMSettingMacvlan *s_macvlan;
|
||||||
const char *ifname;
|
const char *ifname;
|
||||||
|
|
@ -768,6 +768,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (MACVLAN, Macvlan, macvlan,
|
||||||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_MACVLAN_SETTING_NAME),
|
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_MACVLAN_SETTING_NAME),
|
||||||
factory_iface->create_device = create_device;
|
factory_iface->create_device = create_device;
|
||||||
factory_iface->get_connection_parent = get_connection_parent;
|
factory_iface->get_connection_parent = get_connection_parent;
|
||||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
factory_iface->get_connection_iface = get_connection_iface;
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -758,9 +758,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface)
|
const char *parent_iface)
|
||||||
{
|
{
|
||||||
const char *ifname;
|
const char *ifname;
|
||||||
NMSettingVlan *s_vlan;
|
NMSettingVlan *s_vlan;
|
||||||
|
|
@ -789,6 +789,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (VLAN, Vlan, vlan,
|
||||||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_VLAN_SETTING_NAME),
|
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_VLAN_SETTING_NAME),
|
||||||
factory_iface->create_device = create_device;
|
factory_iface->create_device = create_device;
|
||||||
factory_iface->get_connection_parent = get_connection_parent;
|
factory_iface->get_connection_parent = get_connection_parent;
|
||||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
factory_iface->get_connection_iface = get_connection_iface;
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -810,9 +810,9 @@ get_connection_parent (NMDeviceFactory *factory, NMConnection *connection)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_virtual_iface_name (NMDeviceFactory *factory,
|
get_connection_iface (NMDeviceFactory *factory,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
const char *parent_iface)
|
const char *parent_iface)
|
||||||
{
|
{
|
||||||
const char *ifname;
|
const char *ifname;
|
||||||
NMSettingVxlan *s_vxlan;
|
NMSettingVxlan *s_vxlan;
|
||||||
|
|
@ -834,6 +834,6 @@ NM_DEVICE_FACTORY_DEFINE_INTERNAL (VXLAN, Vxlan, vxlan,
|
||||||
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_VXLAN_SETTING_NAME),
|
NM_DEVICE_FACTORY_DECLARE_SETTING_TYPES (NM_SETTING_VXLAN_SETTING_NAME),
|
||||||
factory_iface->create_device = create_device;
|
factory_iface->create_device = create_device;
|
||||||
factory_iface->get_connection_parent = get_connection_parent;
|
factory_iface->get_connection_parent = get_connection_parent;
|
||||||
factory_iface->get_virtual_iface_name = get_virtual_iface_name;
|
factory_iface->get_connection_iface = get_connection_iface;
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -985,10 +985,10 @@ get_virtual_iface_name (NMManager *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
parent = find_parent_device_for_connection (self, connection);
|
parent = find_parent_device_for_connection (self, connection);
|
||||||
iface = nm_device_factory_get_virtual_iface_name (factory,
|
iface = nm_device_factory_get_connection_iface (factory,
|
||||||
connection,
|
connection,
|
||||||
parent ? nm_device_get_ip_iface (parent) : NULL,
|
parent ? nm_device_get_ip_iface (parent) : NULL,
|
||||||
error);
|
error);
|
||||||
if (!iface)
|
if (!iface)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue