Top |
GEnum ├── NMSettingConnectionAutoconnectSlaves ├── NMSettingConnectionDnsOverTls ├── NMSettingConnectionDownOnPoweroff ├── 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.
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.
const char *
nm_setting_connection_get_master (NMSettingConnection *setting
);
nm_setting_connection_get_master
has been deprecated since version 1.46. and should not be used in newly-written code.
Use nm_setting_connection_get_master()
instead which
is just an alias.
Returns the “master” property of the connection.
const char *
nm_setting_connection_get_controller (NMSettingConnection *setting
);
Returns the “controller” property of the connection.
Since: 1.46
gboolean nm_setting_connection_is_slave_type (NMSettingConnection *setting
,const char *type
);
nm_setting_connection_is_slave_type
has been deprecated since version 1.46. and should not be used in newly-written code.
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
);
nm_setting_connection_get_slave_type
has been deprecated since version 1.46. and should not be used in newly-written code.
Use nm_setting_connection_get_port_type()
instead which
is just an alias.
Returns the “slave-type” property of the connection.
const char *
nm_setting_connection_get_port_type (NMSettingConnection *setting
);
Returns the “port-type” property of the connection.
Since: 1.46
NMSettingConnectionAutoconnectSlaves
nm_setting_connection_get_autoconnect_slaves
(NMSettingConnection *setting
);
nm_setting_connection_get_autoconnect_slaves
has been deprecated since version 1.46. and should not be used in newly-written code.
Use nm_setting_connection_get_autoconnect_ports()
instead, this
is just an alias.
Returns the “autoconnect-slaves” property of the connection.
Since: 1.2
NMTernary
nm_setting_connection_get_autoconnect_ports
(NMSettingConnection *setting
);
Returns the “autoconnect-ports” property of the connection.
Since: 1.46
guint32
nm_setting_connection_get_num_secondaries
(NMSettingConnection *setting
);
const char * nm_setting_connection_get_secondary (NMSettingConnection *setting
,guint32 idx
);
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
NMSettingConnectionDownOnPoweroff
nm_setting_connection_get_down_on_poweroff
(NMSettingConnection *setting
);
Returns the NM_SETTING_CONNECTION_DOWN_ON_POWEROFF
property.
Since: 1.48
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_AUTOCONNECT_PORTS "autoconnect-ports"
#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"
#define NM_SETTING_CONNECTION_DOWN_ON_POWEROFF "down-on-poweroff"
NMSettingConnectionAutoconnectSlaves
has been deprecated since version 1.46 and should not be used in newly-written code.
NMSettingConnectionAutoconnectSlaves values indicate whether slave connections should be activated when controller 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
NMSettingConnectionDownOnPoweroff indicates whether the connection will be brought down before the system is powered off.
Since: 1.48