## NMDeviceVlan NMDeviceVlan |

## Functions

GQuark | nm_device_vlan_error_quark ()
GObject * | nm_device_vlan_new ()
const char * | nm_device_vlan_get_hw_address ()
gboolean | nm_device_vlan_get_carrier ()
NMDevice * | nm_device_vlan_get_parent ()
guint | nm_device_vlan_get_vlan_id ()

## Properties

gboolean | carrier | Read
gchar * | hw-address | Read
NMDevice * | parent | Read
guint | vlan-id | Read

## Types and Values

enum | NMDeviceVlanError
#define | NM_DEVICE_VLAN_ERROR
#define | NM_DEVICE_VLAN_HW_ADDRESS
#define | NM_DEVICE_VLAN_CARRIER
#define | NM_DEVICE_VLAN_PARENT
#define | NM_DEVICE_VLAN_VLAN_ID

## Object Hierarchy

        GObject
        ╰── NMObject
            ╰── NMDevice
                ╰── NMDeviceVlan

## Description

## Functions

### nm_device_vlan_error_quark ()

    GQuark
    nm_device_vlan_error_quark (void);

Registers an error quark for NMDeviceVlan if necessary.

#### Returns

the error quark used for NMDeviceVlan errors.

### nm_device_vlan_new ()

    GObject *
    nm_device_vlan_new (DBusGConnection *connection,
                        const char *path);

Creates a new NMDeviceVlan.

#### Parameters

connection | the DBusGConnection |
path | the DBus object path of the device |

#### Returns

a new device.

[transfer full]

### nm_device_vlan_get_hw_address ()

    const char *
    nm_device_vlan_get_hw_address (NMDeviceVlan *device);

Gets the hardware (MAC) address of the NMDeviceVlan

#### Parameters

device | a NMDeviceVlan |

#### Returns

the hardware address. This is the internal string used by the device, and must not be modified.

### nm_device_vlan_get_carrier ()

    gboolean
    nm_device_vlan_get_carrier (NMDeviceVlan *device);

Whether the device has carrier.

#### Parameters

device | a NMDeviceVlan |

#### Returns

`TRUE` if the device has carrier

### nm_device_vlan_get_parent ()

    NMDevice *
    nm_device_vlan_get_parent (NMDeviceVlan *device);

#### Parameters

device | a NMDeviceVlan |

#### Returns

the device's parent device.

[transfer none]

Since: 1.0

### nm_device_vlan_get_vlan_id ()

    guint
    nm_device_vlan_get_vlan_id (NMDeviceVlan *device);

#### Parameters

device | a NMDeviceVlan |

#### Returns

the device's VLAN ID

## Types and Values

### enum NMDeviceVlanError

#### Members

NM_DEVICE_VLAN_ERROR_UNKNOWN | unknown or unclassified error |
NM_DEVICE_VLAN_ERROR_NOT_VLAN_CONNECTION | the connection was not of VLAN type |
NM_DEVICE_VLAN_ERROR_INVALID_VLAN_CONNECTION | the VLAN connection was invalid |
NM_DEVICE_VLAN_ERROR_ID_MISMATCH | the VLAN identifiers of the connection and the device mismatched |
NM_DEVICE_VLAN_ERROR_INTERFACE_MISMATCH | the interfaces of the connection and the device mismatched |
NM_DEVICE_VLAN_ERROR_MAC_MISMATCH | the MACs of the connection and the device mismatched |

### NM_DEVICE_VLAN_ERROR

    #define NM_DEVICE_VLAN_ERROR nm_device_vlan_error_quark ()

### NM_DEVICE_VLAN_HW_ADDRESS

    #define NM_DEVICE_VLAN_HW_ADDRESS  "hw-address"

### NM_DEVICE_VLAN_CARRIER

    #define NM_DEVICE_VLAN_CARRIER     "carrier"

### NM_DEVICE_VLAN_PARENT

    #define NM_DEVICE_VLAN_PARENT      "parent"

### NM_DEVICE_VLAN_VLAN_ID

    #define NM_DEVICE_VLAN_VLAN_ID     "vlan-id"

## Property Details

### The `“carrier”` property

      “carrier”                  gboolean

Whether the device has carrier.

Flags: Read

Default value: FALSE

### The `“hw-address”` property

      “hw-address”               gchar *

The hardware (MAC) address of the device.

Flags: Read

Default value: NULL

### The `“parent”` property

      “parent”                   NMDevice *

The devices's parent device.

Flags: Read

Since: 1.0

### The `“vlan-id”` property

      “vlan-id”                  guint

The device's VLAN ID.

Flags: Read

Allowed values: <= 4095

Default value: 0