Top |
GEnum ├── NMSettingConnectionAutoconnectSlaves ├── NMSettingConnectionDnsOverTls ├── NMSettingConnectionLldp ├── NMSettingConnectionLlmnr ╰── NMSettingConnectionMdns
The NMSettingConnection object is a NMSetting subclass that describes properties that apply to all NMConnection objects, regardless of what type of network connection they describe. Each NMConnection object must contain a NMSettingConnection setting.
NMSetting *
nm_setting_connection_new (void
);
Creates a new NMSettingConnection object with default values.
const char *
nm_setting_connection_get_id (NMSettingConnection *setting
);
Returns the “id” property of the connection.
const char *
nm_setting_connection_get_uuid (NMSettingConnection *setting
);
Returns the “uuid” property of the connection.
const char *
nm_setting_connection_get_stable_id (NMSettingConnection *setting
);
Returns the “stable_id” property of the connection.
Since: 1.4
const char *
nm_setting_connection_get_interface_name
(NMSettingConnection *setting
);
Returns the “interface-name” property of the connection.
const char *
nm_setting_connection_get_connection_type
(NMSettingConnection *setting
);
Returns the “type” property of the connection.
gboolean
nm_setting_connection_get_autoconnect (NMSettingConnection *setting
);
Returns the “autoconnect” property of the connection.
int
nm_setting_connection_get_autoconnect_priority
(NMSettingConnection *setting
);
Returns the “autoconnect-priority” property of the connection. The higher number, the higher priority.
int
nm_setting_connection_get_autoconnect_retries
(NMSettingConnection *setting
);
Returns the “autoconnect-retries” property of the connection. Zero means infinite, -1 means the global default value.
Since: 1.6
NMConnectionMultiConnect
nm_setting_connection_get_multi_connect
(NMSettingConnection *setting
);
Since: 1.14
guint64
nm_setting_connection_get_timestamp (NMSettingConnection *setting
);
Returns the “timestamp” property of the connection.
gboolean
nm_setting_connection_get_read_only (NMSettingConnection *setting
);
nm_setting_connection_get_read_only
has been deprecated since version 1.44 and should not be used in newly-written code.
This property is deprecated and has no meaning.
Returns the “read-only” property of the connection.
guint32
nm_setting_connection_get_num_permissions
(NMSettingConnection *setting
);
Returns the number of entries in the “permissions” property of this setting.
gboolean nm_setting_connection_get_permission (NMSettingConnection *setting
,guint32 idx
,const char **out_ptype
,const char **out_pitem
,const char **out_detail
);
Retrieve one of the entries of the “permissions” property of this setting.
setting |
||
idx |
the zero-based index of the permissions entry |
|
out_ptype |
on return, the permission type. This is currently always "user", unless the entry is invalid, in which case it returns "invalid". |
|
out_pitem |
on return, the permission item (formatted according to |
|
out_detail |
on return, the permission detail (at this time, always |
const char *
nm_setting_connection_get_zone (NMSettingConnection *setting
);
Returns the “zone” property of the connection.
gboolean nm_setting_connection_permissions_user_allowed (NMSettingConnection *setting
,const char *uname
);
Checks whether the given username is allowed to view/access this connection.
gboolean nm_setting_connection_add_permission (NMSettingConnection *setting
,const char *ptype
,const char *pitem
,const char *detail
);
Adds a permission to the connection's permission list. At this time, only
the "user" permission type is supported, and pitem
must be a username. See
“permissions”: for more details.
setting |
||
ptype |
the permission type; at this time only "user" is supported |
|
pitem |
the permission item formatted as required for |
|
detail |
unused at this time; must be |
[nullable] |
void nm_setting_connection_remove_permission (NMSettingConnection *setting
,guint32 idx
);
Removes the permission at index idx
from the connection.
gboolean nm_setting_connection_remove_permission_by_value (NMSettingConnection *setting
,const char *ptype
,const char *pitem
,const char *detail
);
Removes the permission from the connection.
At this time, only the "user" permission type is supported, and pitem
must
be a username. See “permissions”: for more details.
setting |
||
ptype |
the permission type; at this time only "user" is supported |
|
pitem |
the permission item formatted as required for |
|
detail |
unused at this time; must be |
[nullable] |
const char *
nm_setting_connection_get_master (NMSettingConnection *setting
);
Returns the “master” property of the connection.
gboolean nm_setting_connection_is_slave_type (NMSettingConnection *setting
,const char *type
);
setting |
||
type |
the setting name (ie NM_SETTING_BOND_SETTING_NAME) to be matched
against |
const char *
nm_setting_connection_get_slave_type (NMSettingConnection *setting
);
Returns the “slave-type” property of the connection.
NMSettingConnectionAutoconnectSlaves
nm_setting_connection_get_autoconnect_slaves
(NMSettingConnection *setting
);
Returns the “autoconnect-slaves” property of the connection.
Since: 1.2
guint32
nm_setting_connection_get_num_secondaries
(NMSettingConnection *setting
);
const char * nm_setting_connection_get_secondary (NMSettingConnection *setting
,guint32 idx
);
setting |
||
idx |
the zero-based index of the secondary connection UUID entry.
Access one past the length of secondaries is ok and will return
|
gboolean nm_setting_connection_add_secondary (NMSettingConnection *setting
,const char *sec_uuid
);
Adds a new secondary connection UUID to the setting.
void nm_setting_connection_remove_secondary (NMSettingConnection *setting
,guint32 idx
);
Removes the secondary connection UUID at index idx
.
gboolean nm_setting_connection_remove_secondary_by_value (NMSettingConnection *setting
,const char *sec_uuid
);
Removes the secondary connection UUID sec_uuid
.
guint32
nm_setting_connection_get_gateway_ping_timeout
(NMSettingConnection *setting
);
NMMetered
nm_setting_connection_get_metered (NMSettingConnection *setting
);
Since: 1.2
NMSettingConnectionLldp
nm_setting_connection_get_lldp (NMSettingConnection *setting
);
Returns the “lldp” property of the connection.
Since: 1.2
int
nm_setting_connection_get_auth_retries
(NMSettingConnection *setting
);
Returns the value contained in the “auth-retries” property.
the configured authentication retries. Zero means infinity and -1 means a global default value.
Since: 1.10
NMSettingConnectionMdns
nm_setting_connection_get_mdns (NMSettingConnection *setting
);
Since: 1.12
NMSettingConnectionLlmnr
nm_setting_connection_get_llmnr (NMSettingConnection *setting
);
Since: 1.14
NMSettingConnectionDnsOverTls
nm_setting_connection_get_dns_over_tls
(NMSettingConnection *setting
);
Since: 1.34
NMMptcpFlags
nm_setting_connection_get_mptcp_flags (NMSettingConnection *setting
);
Since: 1.42
gint32
nm_setting_connection_get_wait_device_timeout
(NMSettingConnection *setting
);
the NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT
property with
the timeout in milliseconds. -1 is the default.
Since: 1.20
gint32
nm_setting_connection_get_wait_activation_delay
(NMSettingConnection *setting
);
the NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY
property with
the delay in milliseconds. -1 is the default.
Since: 1.40
const char *
nm_setting_connection_get_mud_url (NMSettingConnection *setting
);
Returns the value contained in the “mud-url” property.
Since: 1.26
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MIN -999
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_MAX 999
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY_DEFAULT 0
#define NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITY "autoconnect-priority"
#define NM_SETTING_CONNECTION_AUTOCONNECT_RETRIES "autoconnect-retries"
#define NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES "autoconnect-slaves"
#define NM_SETTING_CONNECTION_GATEWAY_PING_TIMEOUT "gateway-ping-timeout"
#define NM_SETTING_CONNECTION_WAIT_DEVICE_TIMEOUT "wait-device-timeout"
#define NM_SETTING_CONNECTION_WAIT_ACTIVATION_DELAY "wait-activation-delay"
NMSettingConnectionAutoconnectSlaves values indicate whether slave connections should be activated when master is activated.
Since: 1.2
NMSettingConnectionLldp values indicate whether LLDP should be enabled.
Since: 1.2
NMSettingConnectionMdns values indicate whether mDNS should be enabled.
Since: 1.12
NMSettingConnectionLlmnr values indicate whether LLMNR should be enabled.
Since: 1.14
NMSettingConnectionDnsOverTls values indicate whether DNSOverTls should be enabled.
Since: 1.34