Commit 4de8851e authored by Beniamino Galvani's avatar Beniamino Galvani

device/macvlan: support device creation

parent 38710560
......@@ -21,6 +21,12 @@
</tp:docstring>
</property>
<property name="Tap" type="b" access="read">
<tp:docstring>
Whether the device is a macvtap.
</tp:docstring>
</property>
<signal name="PropertiesChanged">
<arg name="properties" type="a{sv}" tp:type="String_Variant_Map">
<tp:docstring>
......
......@@ -1596,7 +1596,8 @@ nm_connection_is_virtual (NMConnection *connection)
|| !strcmp (type, NM_SETTING_BRIDGE_SETTING_NAME)
|| !strcmp (type, NM_SETTING_VLAN_SETTING_NAME)
|| !strcmp (type, NM_SETTING_TUN_SETTING_NAME)
|| !strcmp (type, NM_SETTING_IP_TUNNEL_SETTING_NAME))
|| !strcmp (type, NM_SETTING_IP_TUNNEL_SETTING_NAME)
|| !strcmp (type, NM_SETTING_MACVLAN_SETTING_NAME))
return TRUE;
if (!strcmp (type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
......
......@@ -149,6 +149,8 @@ typedef enum {
* @NM_DEVICE_TYPE_BRIDGE: a bridge master interface
* @NM_DEVICE_TYPE_TEAM: a team master interface
* @NM_DEVICE_TYPE_TUN: a TUN or TAP interface
* @NM_DEVICE_TYPE_IP_TUNNEL: a IP tunnel interface
* @NM_DEVICE_TYPE_MACVLAN: a MACVLAN interface
*
* #NMDeviceType values indicate the type of hardware represented by
* an #NMDevice.
......@@ -174,6 +176,7 @@ typedef enum {
NM_DEVICE_TYPE_TEAM = 15,
NM_DEVICE_TYPE_TUN = 16,
NM_DEVICE_TYPE_IP_TUNNEL = 17,
NM_DEVICE_TYPE_MACVLAN = 18,
} NMDeviceType;
/**
......
......@@ -153,6 +153,7 @@ src/devices/nm-device-ethernet.c
src/devices/nm-device-ethernet-utils.c
src/devices/nm-device-infiniband.c
src/devices/nm-device-ip-tunnel.c
src/devices/nm-device-macvlan.c
src/devices/nm-device-tun.c
src/devices/nm-device-vlan.c
src/devices/team/nm-device-team.c
......
This diff is collapsed.
......@@ -21,7 +21,7 @@
#ifndef __NETWORKMANAGER_DEVICE_MACVLAN_H__
#define __NETWORKMANAGER_DEVICE_MACVLAN_H__
#include "nm-device-generic.h"
#include "nm-device.h"
G_BEGIN_DECLS
......@@ -35,9 +35,10 @@ G_BEGIN_DECLS
#define NM_DEVICE_MACVLAN_PARENT "parent"
#define NM_DEVICE_MACVLAN_MODE "mode"
#define NM_DEVICE_MACVLAN_NO_PROMISC "no-promisc"
#define NM_DEVICE_MACVLAN_TAP "tap"
typedef NMDeviceGeneric NMDeviceMacvlan;
typedef NMDeviceGenericClass NMDeviceMacvlanClass;
typedef NMDevice NMDeviceMacvlan;
typedef NMDeviceClass NMDeviceMacvlanClass;
GType nm_device_macvlan_get_type (void);
......
......@@ -781,6 +781,8 @@ nm_device_get_priority (NMDevice *self)
return 350;
case NM_DEVICE_TYPE_VLAN:
return 400;
case NM_DEVICE_TYPE_MACVLAN:
return 410;
case NM_DEVICE_TYPE_BRIDGE:
return 425;
case NM_DEVICE_TYPE_TUN:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment