## NMDeviceTun NMDeviceTun |

## Functions

4 | NM_DEPRECATED_IN_1_24_FOR ()
const char * | nm_device_tun_get_mode ()
gint64 | nm_device_tun_get_owner ()
gint64 | nm_device_tun_get_group ()
gboolean | nm_device_tun_get_no_pi ()
gboolean | nm_device_tun_get_vnet_hdr ()
gboolean | nm_device_tun_get_multi_queue ()

## Types and Values

#define | NM_DEVICE_TUN_HW_ADDRESS
#define | NM_DEVICE_TUN_OWNER
#define | NM_DEVICE_TUN_GROUP
#define | NM_DEVICE_TUN_MODE
#define | NM_DEVICE_TUN_NO_PI
#define | NM_DEVICE_TUN_VNET_HDR
#define | NM_DEVICE_TUN_MULTI_QUEUE

## Description

## Functions

### NM_DEPRECATED_IN_1_24_FOR ()

    4
    NM_DEPRECATED_IN_1_24_FOR ();

`NM_DEPRECATED_IN_1_24_FOR` is deprecated and should not be used in newly-written code.

### nm_device_tun_get_mode ()

    const char *
    nm_device_tun_get_mode (NMDeviceTun *device);

Returns the TUN/TAP mode for the device.

#### Parameters

device | a NMDeviceTun |

#### Returns

'tun' or 'tap'

Since: 1.2

### nm_device_tun_get_owner ()

    gint64
    nm_device_tun_get_owner (NMDeviceTun *device);

Gets the tunnel owner.

#### Parameters

device | a NMDeviceTun |

#### Returns

the uid of the tunnel owner, or -1 if it has no owner.

Since: 1.2

### nm_device_tun_get_group ()

    gint64
    nm_device_tun_get_group (NMDeviceTun *device);

Gets the tunnel group.

#### Parameters

device | a NMDeviceTun |

#### Returns

the gid of the tunnel group, or -1 if it has no owner.

Since: 1.2

### nm_device_tun_get_no_pi ()

    gboolean
    nm_device_tun_get_no_pi (NMDeviceTun *device);

### nm_device_tun_get_vnet_hdr ()

    gboolean
    nm_device_tun_get_vnet_hdr (NMDeviceTun *device);

Returns whether the NMDeviceTun has the IFF_VNET_HDR flag.

#### Parameters

device | a NMDeviceTun |

#### Returns

`TRUE` if the device has the flag, `FALSE` otherwise

Since: 1.2

### nm_device_tun_get_multi_queue ()

    gboolean
    nm_device_tun_get_multi_queue (NMDeviceTun *device);

Returns whether the NMDeviceTun has the IFF_MULTI_QUEUE flag.

#### Parameters

device | a NMDeviceTun |

#### Returns

`TRUE` if the device doesn't have the flag, `FALSE` otherwise

Since: 1.2

## Types and Values

### NM_DEVICE_TUN_HW_ADDRESS

    #define NM_DEVICE_TUN_HW_ADDRESS   "hw-address"

### NM_DEVICE_TUN_OWNER

    #define NM_DEVICE_TUN_OWNER        "owner"

### NM_DEVICE_TUN_GROUP

    #define NM_DEVICE_TUN_GROUP        "group"

### NM_DEVICE_TUN_MODE

    #define NM_DEVICE_TUN_MODE         "mode"

### NM_DEVICE_TUN_NO_PI

    #define NM_DEVICE_TUN_NO_PI        "no-pi"

### NM_DEVICE_TUN_VNET_HDR

    #define NM_DEVICE_TUN_VNET_HDR     "vnet-hdr"

### NM_DEVICE_TUN_MULTI_QUEUE

    #define NM_DEVICE_TUN_MULTI_QUEUE  "multi-queue"