NMSettingTun

NMSettingTun — Describes connection properties for TUN/TAP interfaces

Synopsis

#define             NM_SETTING_TUN_SETTING_NAME
#define             NM_SETTING_TUN_MODE
#define             NM_SETTING_TUN_OWNER
#define             NM_SETTING_TUN_GROUP
#define             NM_SETTING_TUN_PI
#define             NM_SETTING_TUN_VNET_HDR
#define             NM_SETTING_TUN_MULTI_QUEUE
enum                NMSettingTunMode;
                    NMSettingTun;
                    NMSettingTunClass;
NMSetting *         nm_setting_tun_new                  (void);
NMSettingTunMode    nm_setting_tun_get_mode             (NMSettingTun *setting);
const char *        nm_setting_tun_get_owner            (NMSettingTun *setting);
const char *        nm_setting_tun_get_group            (NMSettingTun *setting);
gboolean            nm_setting_tun_get_pi               (NMSettingTun *setting);
gboolean            nm_setting_tun_get_vnet_hdr         (NMSettingTun *setting);
gboolean            nm_setting_tun_get_multi_queue      (NMSettingTun *setting);

Object Hierarchy

  GEnum
   +----NMSettingTunMode
  GObject
   +----NMSetting
         +----NMSettingTun

Properties

  "group"                    gchar*                : Read / Write
  "mode"                     guint                 : Read / Write / Construct
  "multi-queue"              gboolean              : Read / Write
  "owner"                    gchar*                : Read / Write
  "pi"                       gboolean              : Read / Write
  "vnet-hdr"                 gboolean              : Read / Write

Description

The NMSettingTun object is a NMSetting subclass that describes properties necessary for connection to TUN/TAP interfaces.

Details

NM_SETTING_TUN_SETTING_NAME

#define NM_SETTING_TUN_SETTING_NAME         "tun"


NM_SETTING_TUN_MODE

#define NM_SETTING_TUN_MODE                 "mode"


NM_SETTING_TUN_OWNER

#define NM_SETTING_TUN_OWNER                "owner"


NM_SETTING_TUN_GROUP

#define NM_SETTING_TUN_GROUP                "group"


NM_SETTING_TUN_PI

#define NM_SETTING_TUN_PI                   "pi"


NM_SETTING_TUN_VNET_HDR

#define NM_SETTING_TUN_VNET_HDR             "vnet-hdr"


NM_SETTING_TUN_MULTI_QUEUE

#define NM_SETTING_TUN_MULTI_QUEUE          "multi-queue"


enum NMSettingTunMode

typedef enum {
	NM_SETTING_TUN_MODE_UNKNOWN    = 0,
	NM_SETTING_TUN_MODE_TUN        = 1,
	NM_SETTING_TUN_MODE_TAP        = 2,
} NMSettingTunMode;

NMSettingTunMode values indicate the device type (TUN/TAP)

NM_SETTING_TUN_MODE_UNKNOWN

an unknown device type

NM_SETTING_TUN_MODE_TUN

a TUN device

NM_SETTING_TUN_MODE_TAP

a TAP device

NMSettingTun

typedef struct _NMSettingTun NMSettingTun;

NMSettingTunClass

typedef struct {
	NMSettingClass parent;
} NMSettingTunClass;


nm_setting_tun_new ()

NMSetting *         nm_setting_tun_new                  (void);

Creates a new NMSettingTun object with default values.

Returns :

the new empty NMSettingTun object. [transfer full]

Since 1.2


nm_setting_tun_get_mode ()

NMSettingTunMode    nm_setting_tun_get_mode             (NMSettingTun *setting);

setting :

the NMSettingTun

Returns :

the "mode" property of the setting

Since 1.2


nm_setting_tun_get_owner ()

const char *        nm_setting_tun_get_owner            (NMSettingTun *setting);

setting :

the NMSettingTun

Returns :

the "owner" property of the setting

Since 1.2


nm_setting_tun_get_group ()

const char *        nm_setting_tun_get_group            (NMSettingTun *setting);

setting :

the NMSettingTun

Returns :

the "group" property of the setting

Since 1.2


nm_setting_tun_get_pi ()

gboolean            nm_setting_tun_get_pi               (NMSettingTun *setting);

setting :

the NMSettingTun

Returns :

the "pi" property of the setting

Since 1.2


nm_setting_tun_get_vnet_hdr ()

gboolean            nm_setting_tun_get_vnet_hdr         (NMSettingTun *setting);

setting :

the NMSettingTun

Returns :

the "vnet_hdr" property of the setting

Since 1.2


nm_setting_tun_get_multi_queue ()

gboolean            nm_setting_tun_get_multi_queue      (NMSettingTun *setting);

setting :

the NMSettingTun

Returns :

the "multi-queue" property of the setting

Since 1.2

Property Details

The "group" property

  "group"                    gchar*                : Read / Write

The group ID which will own the device. If set to NULL everyone will be able to use the device.

Default value: NULL

Since 1.2


The "mode" property

  "mode"                     guint                 : Read / Write / Construct

The operating mode of the virtual device. Allowed values are NM_SETTING_TUN_MODE_TUN to create a layer 3 device and NM_SETTING_TUN_MODE_TAP to create an Ethernet-like layer 2 one.

Default value: 1

Since 1.2


The "multi-queue" property

  "multi-queue"              gboolean              : Read / Write

If the property is set to TRUE, the interface will support multiple file descriptors (queues) to parallelize packet sending or receiving. Otherwise, the interface will only support a single queue.

Default value: FALSE

Since 1.2


The "owner" property

  "owner"                    gchar*                : Read / Write

The user ID which will own the device. If set to NULL everyone will be able to use the device.

Default value: NULL

Since 1.2


The "pi" property

  "pi"                       gboolean              : Read / Write

If TRUE the interface will prepend a 4 byte header describing the physical interface to the packets.

Default value: FALSE

Since 1.2


The "vnet-hdr" property

  "vnet-hdr"                 gboolean              : Read / Write

If TRUE the IFF_VNET_HDR the tunnel packets will include a virtio network header.

Default value: FALSE

Since 1.2