![]() |
![]() |
![]() |
libnm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
#define NM_ACTIVE_CONNECTION_CONNECTION #define NM_ACTIVE_CONNECTION_ID #define NM_ACTIVE_CONNECTION_UUID #define NM_ACTIVE_CONNECTION_TYPE #define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT_PATH #define NM_ACTIVE_CONNECTION_DEVICES #define NM_ACTIVE_CONNECTION_STATE #define NM_ACTIVE_CONNECTION_DEFAULT #define NM_ACTIVE_CONNECTION_IP4_CONFIG #define NM_ACTIVE_CONNECTION_DHCP4_CONFIG #define NM_ACTIVE_CONNECTION_DEFAULT6 #define NM_ACTIVE_CONNECTION_IP6_CONFIG #define NM_ACTIVE_CONNECTION_DHCP6_CONFIG #define NM_ACTIVE_CONNECTION_VPN #define NM_ACTIVE_CONNECTION_MASTER NMActiveConnection; NMActiveConnectionClass; NMRemoteConnection * nm_active_connection_get_connection (NMActiveConnection *connection
); const char * nm_active_connection_get_id (NMActiveConnection *connection
); const char * nm_active_connection_get_uuid (NMActiveConnection *connection
); const char * nm_active_connection_get_connection_type (NMActiveConnection *connection
); const char * nm_active_connection_get_specific_object_path (NMActiveConnection *connection
); const GPtrArray * nm_active_connection_get_devices (NMActiveConnection *connection
); NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection
); NMDevice * nm_active_connection_get_master (NMActiveConnection *connection
); gboolean nm_active_connection_get_default (NMActiveConnection *connection
); NMIPConfig * nm_active_connection_get_ip4_config (NMActiveConnection *connection
); NMDhcpConfig * nm_active_connection_get_dhcp4_config (NMActiveConnection *connection
); gboolean nm_active_connection_get_default6 (NMActiveConnection *connection
); NMIPConfig * nm_active_connection_get_ip6_config (NMActiveConnection *connection
); NMDhcpConfig * nm_active_connection_get_dhcp6_config (NMActiveConnection *connection
); gboolean nm_active_connection_get_vpn (NMActiveConnection *connection
);
"connection" NMRemoteConnection* : Read "default" gboolean : Read "default6" gboolean : Read "devices" GPtrArray* : Read "dhcp4-config" NMDhcpConfig* : Read "dhcp6-config" NMDhcpConfig* : Read "id" gchar* : Read "ip4-config" NMIPConfig* : Read "ip6-config" NMIPConfig* : Read "master" NMDevice* : Read "specific-object-path" gchar* : Read "state" NMActiveConnectionState : Read "type" gchar* : Read "uuid" gchar* : Read "vpn" gboolean : Read
#define NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT_PATH "specific-object-path"
NMRemoteConnection * nm_active_connection_get_connection
(NMActiveConnection *connection
);
Gets the NMRemoteConnection associated with connection
.
|
a NMActiveConnection |
Returns : |
the NMRemoteConnection which this NMActiveConnection is an active instance of. [transfer none] |
const char * nm_active_connection_get_id (NMActiveConnection *connection
);
Gets the NMConnection's ID.
|
a NMActiveConnection |
Returns : |
the ID of the NMConnection that backs the NMActiveConnection. This is the internal string used by the connection, and must not be modified. |
const char * nm_active_connection_get_uuid (NMActiveConnection *connection
);
Gets the NMConnection's UUID.
|
a NMActiveConnection |
Returns : |
the UUID of the NMConnection that backs the NMActiveConnection. This is the internal string used by the connection, and must not be modified. |
const char * nm_active_connection_get_connection_type
(NMActiveConnection *connection
);
Gets the NMConnection's type.
|
a NMActiveConnection |
Returns : |
the type of the NMConnection that backs the NMActiveConnection. This is the internal string used by the connection, and must not be modified. |
const char * nm_active_connection_get_specific_object_path
(NMActiveConnection *connection
);
Gets the path of the "specific object" used at activation.
Currently there is no single method that will allow you to automatically turn
this into an appropriate NMObject; you need to know what kind of object it
is based on other information. (Eg, if connection
corresponds to a Wi-Fi
connection, then the specific object will be an NMAccessPoint, and you can
resolve it with nm_device_wifi_get_access_point_by_path()
.)
|
a NMActiveConnection |
Returns : |
the specific object's D-Bus path. This is the internal string used by the connection, and must not be modified. |
const GPtrArray * nm_active_connection_get_devices (NMActiveConnection *connection
);
Gets the NMDevices used for the active connections.
|
a NMActiveConnection |
Returns : |
the GPtrArray containing NMDevices. This is the internal copy used by the connection, and must not be modified. [element-type NMDevice] |
NMActiveConnectionState nm_active_connection_get_state (NMActiveConnection *connection
);
Gets the active connection's state.
|
a NMActiveConnection |
Returns : |
the state |
NMDevice * nm_active_connection_get_master (NMActiveConnection *connection
);
Gets the master NMDevice of the connection.
|
a NMActiveConnection |
Returns : |
the master NMDevice of the NMActiveConnection. [transfer none] |
gboolean nm_active_connection_get_default (NMActiveConnection *connection
);
Whether the active connection is the default IPv4 one (that is, is used for the default IPv4 route and DNS information).
|
a NMActiveConnection |
Returns : |
TRUE if the active connection is the default IPv4 connection |
NMIPConfig * nm_active_connection_get_ip4_config (NMActiveConnection *connection
);
Gets the current IPv4 NMIPConfig associated with the NMActiveConnection.
|
an NMActiveConnection |
Returns : |
the IPv4 NMIPConfig, or NULL if the connection is
not in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state. [transfer none]
|
NMDhcpConfig * nm_active_connection_get_dhcp4_config
(NMActiveConnection *connection
);
Gets the current IPv4 NMDhcpConfig (if any) associated with the NMActiveConnection.
|
an NMActiveConnection |
Returns : |
the IPv4 NMDhcpConfig, or NULL if the connection
does not use DHCP, or is not in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED
state. [transfer none]
|
gboolean nm_active_connection_get_default6 (NMActiveConnection *connection
);
Whether the active connection is the default IPv6 one (that is, is used for the default IPv6 route and DNS information).
|
a NMActiveConnection |
Returns : |
TRUE if the active connection is the default IPv6 connection |
NMIPConfig * nm_active_connection_get_ip6_config (NMActiveConnection *connection
);
Gets the current IPv6 NMIPConfig associated with the NMActiveConnection.
|
an NMActiveConnection |
Returns : |
the IPv6 NMIPConfig, or NULL if the connection is
not in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED state. [transfer none]
|
NMDhcpConfig * nm_active_connection_get_dhcp6_config
(NMActiveConnection *connection
);
Gets the current IPv6 NMDhcpConfig (if any) associated with the NMActiveConnection.
|
an NMActiveConnection |
Returns : |
the IPv6 NMDhcpConfig, or NULL if the connection
does not use DHCPv6, or is not in the NM_ACTIVE_CONNECTION_STATE_ACTIVATED
state. [transfer none]
|
gboolean nm_active_connection_get_vpn (NMActiveConnection *connection
);
Whether the active connection is a VPN connection.
|
a NMActiveConnection |
Returns : |
TRUE if the active connection is a VPN connection |
"connection"
property"connection" NMRemoteConnection* : Read
The connection that this is an active instance of.
"default"
property "default" gboolean : Read
Whether the active connection is the default IPv4 one.
Default value: FALSE
"default6"
property "default6" gboolean : Read
Whether the active connection is the default IPv6 one.
Default value: FALSE
"devices"
property "devices" GPtrArray* : Read
The devices of the active connection.
Element-type: NMDevice
"dhcp4-config"
property"dhcp4-config" NMDhcpConfig* : Read
The IPv4 NMDhcpConfig of the connection.
"dhcp6-config"
property"dhcp6-config" NMDhcpConfig* : Read
The IPv6 NMDhcpConfig of the connection.
"specific-object-path"
property "specific-object-path" gchar* : Read
The path to the "specific object" of the active connection; see
nm_active_connection_get_specific_object_path()
for more details.
Default value: NULL
"state"
property"state" NMActiveConnectionState : Read
The state of the active connection.
Default value: NM_ACTIVE_CONNECTION_STATE_UNKNOWN