![]() |
![]() |
![]() |
libnm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#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
);
"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
The NMSettingTun object is a NMSetting subclass that describes properties necessary for connection to TUN/TAP interfaces.
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)
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
NMSettingTunMode nm_setting_tun_get_mode (NMSettingTun *setting
);
|
the NMSettingTun |
Returns : |
the "mode" property of the setting |
Since 1.2
const char * nm_setting_tun_get_owner (NMSettingTun *setting
);
|
the NMSettingTun |
Returns : |
the "owner" property of the setting |
Since 1.2
const char * nm_setting_tun_get_group (NMSettingTun *setting
);
|
the NMSettingTun |
Returns : |
the "group" property of the setting |
Since 1.2
gboolean nm_setting_tun_get_pi (NMSettingTun *setting
);
|
the NMSettingTun |
Returns : |
the "pi" property of the setting |
Since 1.2
gboolean nm_setting_tun_get_vnet_hdr (NMSettingTun *setting
);
|
the NMSettingTun |
Returns : |
the "vnet_hdr" property of the setting |
Since 1.2
gboolean nm_setting_tun_get_multi_queue (NMSettingTun *setting
);
|
the NMSettingTun |
Returns : |
the "multi-queue" property of the setting |
Since 1.2
"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
"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
"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
"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
"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