NMSettingMacvlan: libnm Reference Manual

## NMSettingMacvlan NMSettingMacvlan — Describes connection properties for macvlan interfaces |

## Functions

NMSetting * | nm_setting_macvlan_new ()
const char * | nm_setting_macvlan_get_parent ()
NMSettingMacvlanMode | nm_setting_macvlan_get_mode ()
gboolean | nm_setting_macvlan_get_promiscuous ()
gboolean | nm_setting_macvlan_get_tap ()

## Properties

guint | mode | Read / Write
gchar * | parent | Read / Write
gboolean | promiscuous | Read / Write
gboolean | tap | Read / Write

## Types and Values

#define | NM_SETTING_MACVLAN_SETTING_NAME
#define | NM_SETTING_MACVLAN_PARENT
#define | NM_SETTING_MACVLAN_MODE
#define | NM_SETTING_MACVLAN_PROMISCUOUS
#define | NM_SETTING_MACVLAN_TAP
| NMSettingMacvlan
enum | NMSettingMacvlanMode

## Object Hierarchy

        GEnum
        ╰── NMSettingMacvlanMode
        GObject
        ╰── NMSetting
            ╰── NMSettingMacvlan

## Description

The NMSettingMacvlan object is a NMSetting subclass that describes properties necessary for connection to macvlan interfaces.

## Functions

### nm_setting_macvlan_new ()

    NMSetting *
    nm_setting_macvlan_new (void);

Creates a new NMSettingMacvlan object with default values.

#### Returns

the new empty NMSettingMacvlan object.

[transfer full]

Since: 1.2

### nm_setting_macvlan_get_parent ()

    const char *
    nm_setting_macvlan_get_parent (NMSettingMacvlan *setting);

#### Parameters

setting | the NMSettingMacvlan |

#### Returns

the “parent” property of the setting

Since: 1.2

### nm_setting_macvlan_get_mode ()

    NMSettingMacvlanMode
    nm_setting_macvlan_get_mode (NMSettingMacvlan *setting);

#### Parameters

setting | the NMSettingMacvlan |

#### Returns

the “mode” property of the setting

Since: 1.2

### nm_setting_macvlan_get_promiscuous ()

    gboolean
    nm_setting_macvlan_get_promiscuous (NMSettingMacvlan *setting);

#### Parameters

setting | the NMSettingMacvlan |

#### Returns

the “promiscuous” property of the setting

Since: 1.2

### nm_setting_macvlan_get_tap ()

    gboolean
    nm_setting_macvlan_get_tap (NMSettingMacvlan *setting);

#### Parameters

setting | the NMSettingMacvlan |

#### Returns

the “tap” property of the setting

Since: 1.2

## Types and Values

### NM_SETTING_MACVLAN_SETTING_NAME

    #define NM_SETTING_MACVLAN_SETTING_NAME         "macvlan"

### NM_SETTING_MACVLAN_PARENT

    #define NM_SETTING_MACVLAN_PARENT               "parent"

### NM_SETTING_MACVLAN_MODE

    #define NM_SETTING_MACVLAN_MODE                 "mode"

### NM_SETTING_MACVLAN_PROMISCUOUS

    #define NM_SETTING_MACVLAN_PROMISCUOUS          "promiscuous"

### NM_SETTING_MACVLAN_TAP

    #define NM_SETTING_MACVLAN_TAP                  "tap"

### NMSettingMacvlan

    typedef struct _NMSettingMacvlan NMSettingMacvlan;

MAC VLAN Settings

### enum NMSettingMacvlanMode

#### Members

NM_SETTING_MACVLAN_MODE_UNKNOWN | unknown/unset mode |
NM_SETTING_MACVLAN_MODE_VEPA | Virtual Ethernet Port Aggregator mode |
NM_SETTING_MACVLAN_MODE_BRIDGE | bridge mode |
NM_SETTING_MACVLAN_MODE_PRIVATE | private mode |
NM_SETTING_MACVLAN_MODE_PASSTHRU | passthru mode |
NM_SETTING_MACVLAN_MODE_SOURCE | source mode |
_NM_SETTING_MACVLAN_MODE_NUM |  |
NM_SETTING_MACVLAN_MODE_LAST |  |

## Property Details

### The `“mode”` property

      “mode”                     guint

The macvlan mode, which specifies the communication mechanism between multiple macvlans on the same lower device.

Owner: NMSettingMacvlan

Flags: Read / Write

Default value: 0

Since: 1.2

### The `“parent”` property

      “parent”                   gchar *

If given, specifies the parent interface name or parent connection UUID from which this MAC-VLAN interface should be created. If this property is not specified, the connection must contain an NMSettingWired setting with a “mac-address” property.

Owner: NMSettingMacvlan

Flags: Read / Write

Default value: NULL

Since: 1.2

### The `“promiscuous”` property

      “promiscuous”              gboolean

Whether the interface should be put in promiscuous mode.

Owner: NMSettingMacvlan

Flags: Read / Write

Default value: TRUE

Since: 1.2

### The `“tap”` property

      “tap”                      gboolean

Whether the interface should be a MACVTAP.

Owner: NMSettingMacvlan

Flags: Read / Write

Default value: FALSE

Since: 1.2