1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301 USA.
18 * Copyright 2007 - 2014 Red Hat, Inc.
19 * Copyright 2008 Novell, Inc.
22 #include "nm-default.h"
26 #include "NetworkManager.h"
27 #include "nm-active-connection.h"
28 #include "nm-object-private.h"
29 #include "nm-types-private.h"
30 #include "nm-device.h"
31 #include "nm-device-private.h"
32 #include "nm-connection.h"
33 #include "nm-vpn-connection.h"
34 #include "nm-dbus-helpers-private.h"
36 static GType _nm_active_connection_type_for_path (DBusGConnection *connection,
38 static void _nm_active_connection_type_for_path_async (DBusGConnection *connection,
40 NMObjectTypeCallbackFunc callback,
43 G_DEFINE_TYPE_WITH_CODE (NMActiveConnection, nm_active_connection, NM_TYPE_OBJECT,
44 _nm_object_register_type_func (g_define_type_id,
45 _nm_active_connection_type_for_path,
46 _nm_active_connection_type_for_path_async);
49 #define NM_ACTIVE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnectionPrivate))
58 char *specific_object;
60 NMActiveConnectionState state;
62 NMIP4Config *ip4_config;
63 NMDHCP4Config *dhcp4_config;
65 NMIP6Config *ip6_config;
66 NMDHCP6Config *dhcp6_config;
69 } NMActiveConnectionPrivate;
93 * nm_active_connection_new:
94 * @connection: the #DBusGConnection
95 * @path: the DBus object path of the device
97 * Creates a new #NMActiveConnection.
99 * Returns: (transfer full): a new active connection
102 nm_active_connection_new (DBusGConnection *connection, const char *path)
104 g_return_val_if_fail (connection != NULL, NULL);
105 g_return_val_if_fail (path != NULL, NULL);
107 return g_object_new (NM_TYPE_ACTIVE_CONNECTION,
108 NM_OBJECT_DBUS_CONNECTION, connection,
109 NM_OBJECT_DBUS_PATH, path,
114 _nm_active_connection_type_for_path (DBusGConnection *connection,
118 GError *error = NULL;
119 GValue value = G_VALUE_INIT;
122 proxy = _nm_dbus_new_proxy_for_connection (connection, path, DBUS_INTERFACE_PROPERTIES);
124 g_warning ("%s: couldn't create D-Bus object proxy.", __func__);
125 return G_TYPE_INVALID;
128 /* Have to create an NMVPNConnection if it's a VPN connection, otherwise
129 * a plain NMActiveConnection.
131 if (dbus_g_proxy_call (proxy,
133 G_TYPE_STRING, NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
134 G_TYPE_STRING, "Vpn",
136 G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
137 if (g_value_get_boolean (&value))
138 type = NM_TYPE_VPN_CONNECTION;
140 type = NM_TYPE_ACTIVE_CONNECTION;
142 g_warning ("Error in getting active connection 'Vpn' property: %s",
144 g_error_free (error);
145 type = G_TYPE_INVALID;
148 g_object_unref (proxy);
153 DBusGConnection *connection;
154 NMObjectTypeCallbackFunc callback;
156 } NMActiveConnectionAsyncData;
159 async_got_type (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data)
161 NMActiveConnectionAsyncData *async_data = user_data;
162 GValue value = G_VALUE_INIT;
163 const char *path = dbus_g_proxy_get_path (proxy);
164 GError *error = NULL;
167 if (dbus_g_proxy_end_call (proxy, call, &error,
168 G_TYPE_VALUE, &value,
170 if (g_value_get_boolean (&value))
171 type = NM_TYPE_VPN_CONNECTION;
173 type = NM_TYPE_ACTIVE_CONNECTION;
175 g_warning ("%s: could not read properties for %s: %s", __func__, path, error->message);
176 type = G_TYPE_INVALID;
179 async_data->callback (type, async_data->user_data);
181 g_object_unref (proxy);
182 g_slice_free (NMActiveConnectionAsyncData, async_data);
186 _nm_active_connection_type_for_path_async (DBusGConnection *connection,
188 NMObjectTypeCallbackFunc callback,
191 NMActiveConnectionAsyncData *async_data;
194 async_data = g_slice_new (NMActiveConnectionAsyncData);
195 async_data->connection = connection;
196 async_data->callback = callback;
197 async_data->user_data = user_data;
199 proxy = _nm_dbus_new_proxy_for_connection (connection, path, DBUS_INTERFACE_PROPERTIES);
200 dbus_g_proxy_begin_call (proxy, "Get",
201 async_got_type, async_data, NULL,
202 G_TYPE_STRING, NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
203 G_TYPE_STRING, "Vpn",
208 * nm_active_connection_get_connection:
209 * @connection: a #NMActiveConnection
211 * Gets the #NMConnection's DBus object path. This is often used with
212 * nm_remote_settings_get_connection_by_path() to retrieve the
213 * #NMRemoteConnection object that describes the connection.
215 * Returns: the object path of the #NMConnection which this #NMActiveConnection
216 * is an active instance of. This is the internal string used by the
217 * connection, and must not be modified.
220 nm_active_connection_get_connection (NMActiveConnection *connection)
222 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
224 _nm_object_ensure_inited (NM_OBJECT (connection));
225 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->connection;
229 * nm_active_connection_get_id:
230 * @connection: a #NMActiveConnection
232 * Gets the #NMConnection's ID.
234 * Returns: the ID of the #NMConnection that backs the #NMActiveConnection.
235 * This is the internal string used by the connection, and must not be modified.
240 nm_active_connection_get_id (NMActiveConnection *connection)
242 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
244 _nm_object_ensure_inited (NM_OBJECT (connection));
245 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->id;
249 * nm_active_connection_get_uuid:
250 * @connection: a #NMActiveConnection
252 * Gets the #NMConnection's UUID.
254 * Returns: the UUID of the #NMConnection that backs the #NMActiveConnection.
255 * This is the internal string used by the connection, and must not be modified.
258 nm_active_connection_get_uuid (NMActiveConnection *connection)
260 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
262 _nm_object_ensure_inited (NM_OBJECT (connection));
263 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->uuid;
267 * nm_active_connection_get_connection_type:
268 * @connection: a #NMActiveConnection
270 * Gets the #NMConnection's type.
272 * Returns: the type of the #NMConnection that backs the #NMActiveConnection.
273 * This is the internal string used by the connection, and must not be modified.
278 nm_active_connection_get_connection_type (NMActiveConnection *connection)
280 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
282 _nm_object_ensure_inited (NM_OBJECT (connection));
283 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->type;
287 * nm_active_connection_get_specific_object:
288 * @connection: a #NMActiveConnection
290 * Gets the "specific object" used at the activation.
292 * Returns: the specific object's DBus path. This is the internal string used by the
293 * connection, and must not be modified.
296 nm_active_connection_get_specific_object (NMActiveConnection *connection)
298 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
300 _nm_object_ensure_inited (NM_OBJECT (connection));
301 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->specific_object;
305 * nm_active_connection_get_devices:
306 * @connection: a #NMActiveConnection
308 * Gets the #NMDevices used for the active connections.
310 * Returns: (element-type NMDevice): the #GPtrArray containing #NMDevices.
311 * This is the internal copy used by the connection, and must not be modified.
314 nm_active_connection_get_devices (NMActiveConnection *connection)
316 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
318 _nm_object_ensure_inited (NM_OBJECT (connection));
319 return handle_ptr_array_return (NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->devices);
323 * nm_active_connection_get_state:
324 * @connection: a #NMActiveConnection
326 * Gets the active connection's state.
330 NMActiveConnectionState
331 nm_active_connection_get_state (NMActiveConnection *connection)
333 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NM_ACTIVE_CONNECTION_STATE_UNKNOWN);
335 _nm_object_ensure_inited (NM_OBJECT (connection));
336 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->state;
340 * nm_active_connection_get_default:
341 * @connection: a #NMActiveConnection
343 * Whether the active connection is the default IPv4 one (that is, is used for
344 * the default IPv4 route and DNS information).
346 * Returns: %TRUE if the active connection is the default IPv4 connection
349 nm_active_connection_get_default (NMActiveConnection *connection)
351 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
353 _nm_object_ensure_inited (NM_OBJECT (connection));
354 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_default;
358 * nm_active_connection_get_ip4_config:
359 * @connection: an #NMActiveConnection
361 * Gets the current #NMIP4Config associated with the #NMActiveConnection.
363 * Returns: (transfer none): the #NMIP4Config, or %NULL if the
364 * connection is not in the %NM_ACTIVE_CONNECTION_STATE_ACTIVATED
370 nm_active_connection_get_ip4_config (NMActiveConnection *connection)
372 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
374 _nm_object_ensure_inited (NM_OBJECT (connection));
375 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->ip4_config;
379 * nm_active_connection_get_dhcp4_config:
380 * @connection: an #NMActiveConnection
382 * Gets the current #NMDHCP4Config (if any) associated with the
383 * #NMActiveConnection.
385 * Returns: (transfer none): the #NMDHCP4Config, or %NULL if the
386 * connection does not use DHCP, or is not in the
387 * %NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
392 nm_active_connection_get_dhcp4_config (NMActiveConnection *connection)
394 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
396 _nm_object_ensure_inited (NM_OBJECT (connection));
397 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->dhcp4_config;
401 * nm_active_connection_get_default6:
402 * @connection: a #NMActiveConnection
404 * Whether the active connection is the default IPv6 one (that is, is used for
405 * the default IPv6 route and DNS information).
407 * Returns: %TRUE if the active connection is the default IPv6 connection
410 nm_active_connection_get_default6 (NMActiveConnection *connection)
412 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
414 _nm_object_ensure_inited (NM_OBJECT (connection));
415 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_default6;
419 * nm_active_connection_get_ip6_config:
420 * @connection: an #NMActiveConnection
422 * Gets the current #NMIP6Config associated with the #NMActiveConnection.
424 * Returns: (transfer none): the #NMIP6Config, or %NULL if the
425 * connection is not in the %NM_ACTIVE_CONNECTION_STATE_ACTIVATED
431 nm_active_connection_get_ip6_config (NMActiveConnection *connection)
433 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
435 _nm_object_ensure_inited (NM_OBJECT (connection));
436 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->ip6_config;
440 * nm_active_connection_get_dhcp6_config:
441 * @connection: an #NMActiveConnection
443 * Gets the current #NMDHCP6Config (if any) associated with the
444 * #NMActiveConnection.
446 * Returns: (transfer none): the #NMDHCP6Config, or %NULL if the
447 * connection does not use DHCPv6, or is not in the
448 * %NM_ACTIVE_CONNECTION_STATE_ACTIVATED state.
453 nm_active_connection_get_dhcp6_config (NMActiveConnection *connection)
455 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
457 _nm_object_ensure_inited (NM_OBJECT (connection));
458 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->dhcp6_config;
462 * nm_active_connection_get_vpn:
463 * @connection: a #NMActiveConnection
465 * Whether the active connection is a VPN connection.
467 * Returns: %TRUE if the active connection is a VPN connection
472 nm_active_connection_get_vpn (NMActiveConnection *connection)
474 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), FALSE);
476 _nm_object_ensure_inited (NM_OBJECT (connection));
477 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->is_vpn;
481 * nm_active_connection_get_master:
482 * @connection: a #NMActiveConnection
484 * Gets the path to the master #NMDevice of the connection.
486 * Returns: the path of the master #NMDevice of the #NMActiveConnection.
487 * This is the internal string used by the connection, and must not be modified.
490 nm_active_connection_get_master (NMActiveConnection *connection)
492 g_return_val_if_fail (NM_IS_ACTIVE_CONNECTION (connection), NULL);
494 _nm_object_ensure_inited (NM_OBJECT (connection));
495 return NM_ACTIVE_CONNECTION_GET_PRIVATE (connection)->master;
499 nm_active_connection_init (NMActiveConnection *ap)
504 dispose (GObject *object)
506 NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
509 g_ptr_array_set_free_func (priv->devices, g_object_unref);
510 g_ptr_array_free (priv->devices, TRUE);
511 priv->devices = NULL;
514 g_clear_object (&priv->ip4_config);
515 g_clear_object (&priv->dhcp4_config);
516 g_clear_object (&priv->ip6_config);
517 g_clear_object (&priv->dhcp6_config);
519 g_clear_object (&priv->proxy);
521 G_OBJECT_CLASS (nm_active_connection_parent_class)->dispose (object);
525 finalize (GObject *object)
527 NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
529 g_free (priv->connection);
533 g_free (priv->specific_object);
534 g_free (priv->master);
536 G_OBJECT_CLASS (nm_active_connection_parent_class)->finalize (object);
540 get_property (GObject *object,
545 NMActiveConnection *self = NM_ACTIVE_CONNECTION (object);
547 _nm_object_ensure_inited (NM_OBJECT (object));
550 case PROP_CONNECTION:
551 g_value_set_string (value, nm_active_connection_get_connection (self));
554 g_value_set_string (value, nm_active_connection_get_id (self));
557 g_value_set_string (value, nm_active_connection_get_uuid (self));
560 g_value_set_string (value, nm_active_connection_get_connection_type (self));
562 case PROP_SPECIFIC_OBJECT:
563 g_value_set_boxed (value, nm_active_connection_get_specific_object (self));
566 g_value_set_boxed (value, nm_active_connection_get_devices (self));
569 g_value_set_uint (value, nm_active_connection_get_state (self));
572 g_value_set_boolean (value, nm_active_connection_get_default (self));
574 case PROP_IP4_CONFIG:
575 g_value_set_object (value, nm_active_connection_get_ip4_config (self));
577 case PROP_DHCP4_CONFIG:
578 g_value_set_object (value, nm_active_connection_get_dhcp4_config (self));
581 g_value_set_boolean (value, nm_active_connection_get_default6 (self));
583 case PROP_IP6_CONFIG:
584 g_value_set_object (value, nm_active_connection_get_ip6_config (self));
586 case PROP_DHCP6_CONFIG:
587 g_value_set_object (value, nm_active_connection_get_dhcp6_config (self));
590 g_value_set_boolean (value, nm_active_connection_get_vpn (self));
593 g_value_set_string (value, nm_active_connection_get_master (self));
596 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
602 register_properties (NMActiveConnection *connection)
604 NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (connection);
605 const NMPropertiesInfo property_info[] = {
606 { NM_ACTIVE_CONNECTION_CONNECTION, &priv->connection },
607 { NM_ACTIVE_CONNECTION_ID, &priv->id },
608 { NM_ACTIVE_CONNECTION_UUID, &priv->uuid },
609 { NM_ACTIVE_CONNECTION_TYPE, &priv->type },
610 { NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, &priv->specific_object },
611 { NM_ACTIVE_CONNECTION_DEVICES, &priv->devices, NULL, NM_TYPE_DEVICE },
612 { NM_ACTIVE_CONNECTION_STATE, &priv->state },
613 { NM_ACTIVE_CONNECTION_DEFAULT, &priv->is_default },
614 { NM_ACTIVE_CONNECTION_IP4_CONFIG, &priv->ip4_config, NULL, NM_TYPE_IP4_CONFIG },
615 { NM_ACTIVE_CONNECTION_DHCP4_CONFIG, &priv->dhcp4_config, NULL, NM_TYPE_DHCP4_CONFIG },
616 { NM_ACTIVE_CONNECTION_DEFAULT6, &priv->is_default6 },
617 { NM_ACTIVE_CONNECTION_IP6_CONFIG, &priv->ip6_config, NULL, NM_TYPE_IP6_CONFIG },
618 { NM_ACTIVE_CONNECTION_DHCP6_CONFIG, &priv->dhcp6_config, NULL, NM_TYPE_DHCP6_CONFIG },
619 { NM_ACTIVE_CONNECTION_VPN, &priv->is_vpn },
620 { NM_ACTIVE_CONNECTION_MASTER, &priv->master },
625 _nm_object_register_properties (NM_OBJECT (connection),
631 constructed (GObject *object)
633 NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (object);
635 G_OBJECT_CLASS (nm_active_connection_parent_class)->constructed (object);
637 priv->proxy = _nm_object_new_proxy (NM_OBJECT (object), NULL, NM_DBUS_INTERFACE_ACTIVE_CONNECTION);
638 register_properties (NM_ACTIVE_CONNECTION (object));
643 nm_active_connection_class_init (NMActiveConnectionClass *ap_class)
645 GObjectClass *object_class = G_OBJECT_CLASS (ap_class);
647 g_type_class_add_private (ap_class, sizeof (NMActiveConnectionPrivate));
649 /* virtual methods */
650 object_class->constructed = constructed;
651 object_class->get_property = get_property;
652 object_class->dispose = dispose;
653 object_class->finalize = finalize;
658 * NMActiveConnection:connection:
660 * The connection's path of the active connection.
662 g_object_class_install_property
663 (object_class, PROP_CONNECTION,
664 g_param_spec_string (NM_ACTIVE_CONNECTION_CONNECTION, "", "",
667 G_PARAM_STATIC_STRINGS));
670 * NMActiveConnection:id:
672 * The active connection's ID
676 g_object_class_install_property
677 (object_class, PROP_ID,
678 g_param_spec_string (NM_ACTIVE_CONNECTION_ID, "", "",
681 G_PARAM_STATIC_STRINGS));
684 * NMActiveConnection:uuid:
686 * The active connection's UUID
688 g_object_class_install_property
689 (object_class, PROP_UUID,
690 g_param_spec_string (NM_ACTIVE_CONNECTION_UUID, "", "",
693 G_PARAM_STATIC_STRINGS));
696 * NMActiveConnection:type:
698 * The active connection's type
702 g_object_class_install_property
703 (object_class, PROP_TYPE,
704 g_param_spec_string (NM_ACTIVE_CONNECTION_TYPE, "", "",
707 G_PARAM_STATIC_STRINGS));
710 * NMActiveConnection:specific-object:
712 * The specific object's path of the active connection.
714 g_object_class_install_property
715 (object_class, PROP_SPECIFIC_OBJECT,
716 g_param_spec_string (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, "", "",
719 G_PARAM_STATIC_STRINGS));
722 * NMActiveConnection:device:
724 * The devices (#NMDevice) of the active connection.
726 g_object_class_install_property
727 (object_class, PROP_DEVICES,
728 g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES, "", "",
729 NM_TYPE_OBJECT_ARRAY,
731 G_PARAM_STATIC_STRINGS));
734 * NMActiveConnection:state:
736 * The state of the active connection.
738 g_object_class_install_property
739 (object_class, PROP_STATE,
740 g_param_spec_uint (NM_ACTIVE_CONNECTION_STATE, "", "",
741 NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
742 NM_ACTIVE_CONNECTION_STATE_DEACTIVATING,
743 NM_ACTIVE_CONNECTION_STATE_UNKNOWN,
745 G_PARAM_STATIC_STRINGS));
748 * NMActiveConnection:default:
750 * Whether the active connection is the default IPv4 one.
752 g_object_class_install_property
753 (object_class, PROP_DEFAULT,
754 g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, "", "",
757 G_PARAM_STATIC_STRINGS));
760 * NMActiveConnection:ip4-config:
762 * The #NMIP4Config of the connection.
766 g_object_class_install_property
767 (object_class, PROP_IP4_CONFIG,
768 g_param_spec_object (NM_ACTIVE_CONNECTION_IP4_CONFIG, "", "",
771 G_PARAM_STATIC_STRINGS));
774 * NMActiveConnection:dhcp4-config:
776 * The #NMDHCP4Config of the connection.
780 g_object_class_install_property
781 (object_class, PROP_DHCP4_CONFIG,
782 g_param_spec_object (NM_ACTIVE_CONNECTION_DHCP4_CONFIG, "", "",
783 NM_TYPE_DHCP4_CONFIG,
785 G_PARAM_STATIC_STRINGS));
788 * NMActiveConnection:default6:
790 * Whether the active connection is the default IPv6 one.
792 g_object_class_install_property
793 (object_class, PROP_DEFAULT6,
794 g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, "", "",
797 G_PARAM_STATIC_STRINGS));
800 * NMActiveConnection:ip6-config:
802 * The #NMIP6Config of the connection.
806 g_object_class_install_property
807 (object_class, PROP_IP6_CONFIG,
808 g_param_spec_object (NM_ACTIVE_CONNECTION_IP6_CONFIG, "", "",
811 G_PARAM_STATIC_STRINGS));
814 * NMActiveConnection:dhcp6-config:
816 * The #NMDHCP6Config of the connection.
820 g_object_class_install_property
821 (object_class, PROP_DHCP6_CONFIG,
822 g_param_spec_object (NM_ACTIVE_CONNECTION_DHCP6_CONFIG, "", "",
823 NM_TYPE_DHCP6_CONFIG,
825 G_PARAM_STATIC_STRINGS));
828 * NMActiveConnection:vpn:
830 * Whether the active connection is a VPN connection.
834 g_object_class_install_property
835 (object_class, PROP_VPN,
836 g_param_spec_boolean (NM_ACTIVE_CONNECTION_VPN, "", "",
839 G_PARAM_STATIC_STRINGS));
842 * NMActiveConnection:master:
844 * The path of the master device if one exists.
846 g_object_class_install_property
847 (object_class, PROP_MASTER,
848 g_param_spec_string (NM_ACTIVE_CONNECTION_MASTER, "", "",
851 G_PARAM_STATIC_STRINGS));