summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-07-23 10:56:26 -0400
committerDan Winship <danw@gnome.org>2014-07-23 10:56:26 -0400
commit4a6f91c77c951469a4c3a478553afade71058c87 (patch)
treef63ed573ecc79f1b0073573f9f1408ef659e2a36
parent371c68cee98f744f501c4feb5b38167b9cda951c (diff)
parent7da97fc6fece2b462d420e01bc3ab1c9ea6b351e (diff)
downloadNetworkManager-4a6f91c77c951469a4c3a478553afade71058c87.tar.gz
core: misc cleanup
spin-off of https://bugzilla.gnome.org/show_bug.cgi?id=680909
-rw-r--r--src/Makefile.am5
-rw-r--r--src/NetworkManagerUtils.c8
-rw-r--r--src/NetworkManagerUtils.h5
-rw-r--r--src/config/nm-config-device.c82
-rw-r--r--src/config/nm-config-device.h47
-rw-r--r--src/config/nm-config.c38
-rw-r--r--src/config/nm-config.h8
-rw-r--r--src/config/tests/Makefile.am3
-rw-r--r--src/config/tests/nm-test-device.c92
-rw-r--r--src/config/tests/nm-test-device.h10
-rw-r--r--src/config/tests/test-config.c22
-rw-r--r--src/devices/adsl/Makefile.am4
-rw-r--r--src/devices/bluetooth/Makefile.am5
-rw-r--r--src/devices/nm-device-factory.h1
-rw-r--r--src/devices/nm-device-infiniband.c3
-rw-r--r--src/devices/nm-device-vlan.c3
-rw-r--r--src/devices/nm-device.c19
-rw-r--r--src/devices/nm-device.h7
-rw-r--r--src/devices/team/Makefile.am6
-rw-r--r--src/devices/team/nm-team-factory.c1
-rw-r--r--src/devices/wifi/Makefile.am5
-rw-r--r--src/devices/wifi/nm-device-olpc-mesh.c1
-rw-r--r--src/devices/wifi/nm-device-wifi.c1
-rw-r--r--src/devices/wifi/nm-wifi-factory.c1
-rw-r--r--src/devices/wifi/tests/Makefile.am1
-rw-r--r--src/devices/wimax/Makefile.am5
-rw-r--r--src/devices/wimax/nm-device-wimax.c2
-rw-r--r--src/devices/wimax/nm-wimax-factory.c1
-rw-r--r--src/devices/wwan/Makefile.am1
-rw-r--r--src/devices/wwan/nm-modem-broadband.c1
-rw-r--r--src/dhcp-manager/nm-dhcp-client.c1
-rw-r--r--src/dhcp-manager/nm-dhcp-dhclient-utils.c1
-rw-r--r--src/dhcp-manager/nm-dhcp-utils.c1
-rw-r--r--src/dhcp-manager/tests/test-dhcp-dhclient.c1
-rw-r--r--src/dhcp-manager/tests/test-dhcp-options.c1
-rw-r--r--src/dns-manager/nm-dns-utils.c1
-rw-r--r--src/main.c1
-rw-r--r--src/nm-activation-request.c2
-rw-r--r--src/nm-activation-request.h5
-rw-r--r--src/nm-active-connection.c1
-rw-r--r--src/nm-active-connection.h5
-rw-r--r--src/nm-auth-subject.h6
-rw-r--r--src/nm-connection-provider.h4
-rw-r--r--src/nm-connectivity.h5
-rw-r--r--src/nm-dbus-manager.h6
-rw-r--r--src/nm-dhcp4-config.h6
-rw-r--r--src/nm-dhcp6-config.h6
-rw-r--r--src/nm-dispatcher.c3
-rw-r--r--src/nm-dispatcher.h4
-rw-r--r--src/nm-ip4-config.h6
-rw-r--r--src/nm-ip6-config.h6
-rw-r--r--src/nm-manager-auth.c1
-rw-r--r--src/nm-manager-auth.h4
-rw-r--r--src/nm-manager.c4
-rw-r--r--src/nm-manager.h10
-rw-r--r--src/nm-policy.c5
-rw-r--r--src/nm-policy.h7
-rw-r--r--src/nm-rfkill-manager.h6
-rw-r--r--src/nm-session-monitor.h3
-rw-r--r--src/nm-sleep-monitor.h3
-rw-r--r--src/nm-types.h31
-rw-r--r--src/platform/nm-platform.h21
-rw-r--r--src/ppp-manager/nm-ppp-manager.c1
-rw-r--r--src/rdisc/nm-lndp-rdisc.c1
-rw-r--r--src/rdisc/tests/Makefile.am8
-rw-r--r--src/settings/nm-agent-manager.c3
-rw-r--r--src/settings/nm-agent-manager.h5
-rw-r--r--src/settings/nm-secret-agent.c1
-rw-r--r--src/settings/nm-secret-agent.h7
-rw-r--r--src/settings/nm-settings-connection.c1
-rw-r--r--src/settings/nm-settings-connection.h6
-rw-r--r--src/settings/nm-settings.c6
-rw-r--r--src/settings/nm-settings.h9
-rw-r--r--src/settings/nm-system-config-interface.c1
-rw-r--r--src/settings/nm-system-config-interface.h2
-rw-r--r--src/settings/plugins/example/Makefile.am1
-rw-r--r--src/settings/plugins/ifcfg-rh/Makefile.am3
-rw-r--r--src/settings/plugins/ifcfg-rh/tests/Makefile.am5
-rw-r--r--src/settings/plugins/ifcfg-suse/Makefile.am4
-rw-r--r--src/settings/plugins/ifnet/Makefile.am5
-rw-r--r--src/settings/plugins/ifnet/tests/Makefile.am3
-rw-r--r--src/settings/plugins/ifupdown/Makefile.am3
-rw-r--r--src/settings/plugins/ifupdown/tests/Makefile.am4
-rw-r--r--src/settings/plugins/keyfile/Makefile.am1
-rw-r--r--src/settings/plugins/keyfile/tests/Makefile.am3
-rw-r--r--src/settings/tests/Makefile.am3
-rw-r--r--src/tests/Makefile.am1
-rw-r--r--src/tests/test-ip4-config.c1
-rw-r--r--src/tests/test-ip6-config.c1
-rw-r--r--src/tests/test-resolvconf-capture.c2
-rw-r--r--src/vpn-manager/nm-vpn-connection.c3
-rw-r--r--src/vpn-manager/nm-vpn-connection.h1
92 files changed, 283 insertions, 367 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 367b4c85fa..d4ffab0901 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,15 +57,13 @@ sbin_PROGRAMS = NetworkManager
NetworkManager_SOURCES = \
main.c
-NetworkManager_LDADD = libNetworkManager.la $(LIBNDP_LIBS)
+NetworkManager_LDADD = libNetworkManager.la
noinst_LTLIBRARIES = libNetworkManager.la
nm_sources = \
config/nm-config.c \
config/nm-config.h \
- config/nm-config-device.c \
- config/nm-config-device.h \
\
devices/nm-device.c \
devices/nm-device.h \
@@ -364,6 +362,7 @@ libNetworkManager_la_LIBADD = \
$(LIBNL_LIBS) \
$(POLKIT_LIBS) \
$(SYSTEMD_LOGIN_LIBS) \
+ $(LIBNDP_LIBS) \
$(LIBDL) \
$(LIBM)
diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
index 369ae2ca46..888141c65c 100644
--- a/src/NetworkManagerUtils.c
+++ b/src/NetworkManagerUtils.c
@@ -28,9 +28,11 @@
#include <resolv.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <linux/if.h>
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
+#include "nm-setting-private.h"
#include "nm-logging.h"
#include "nm-device.h"
#include "nm-setting-connection.h"
@@ -587,6 +589,9 @@ nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr)
g_return_val_if_fail (hwaddr != NULL, FALSE);
+ if (nm_match_spec_string (specs, hwaddr))
+ return TRUE;
+
hwaddr_match = g_strdup_printf ("mac:%s", hwaddr);
matched = nm_match_spec_string (specs, hwaddr_match);
g_free (hwaddr_match);
@@ -601,6 +606,9 @@ nm_match_spec_interface_name (const GSList *specs, const char *interface_name)
g_return_val_if_fail (interface_name != NULL, FALSE);
+ if (nm_match_spec_string (specs, interface_name))
+ return TRUE;
+
iface_match = g_strdup_printf ("interface-name:%s", interface_name);
matched = nm_match_spec_string (specs, iface_match);
g_free (iface_match);
diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h
index 719a51b726..f1cd62a263 100644
--- a/src/NetworkManagerUtils.h
+++ b/src/NetworkManagerUtils.h
@@ -26,12 +26,7 @@
#include <stdio.h>
#include <net/ethernet.h>
-#include "nm-ip4-config.h"
-#include "nm-setting-ip4-config.h"
-#include "nm-ip6-config.h"
-#include "nm-setting-ip6-config.h"
#include "nm-connection.h"
-#include "nm-setting-private.h"
gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
diff --git a/src/config/nm-config-device.c b/src/config/nm-config-device.c
deleted file mode 100644
index 6914f033a2..0000000000
--- a/src/config/nm-config-device.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2013 Red Hat, Inc.
- */
-
-#include "config.h"
-
-#include "nm-config-device.h"
-
-#include <net/if_arp.h>
-
-#include <nm-utils.h>
-
-G_DEFINE_INTERFACE (NMConfigDevice, nm_config_device, G_TYPE_OBJECT)
-
-static void
-nm_config_device_default_init (NMConfigDeviceInterface *iface)
-{
-}
-
-gboolean
-nm_config_device_spec_match_list (NMConfigDevice *self, const char **config_specs)
-{
- GSList *specs = NULL;
- gboolean match;
- char buf[NM_UTILS_HWADDR_LEN_MAX + 1], *tmp;
- int i;
-
- g_return_val_if_fail (NM_IS_CONFIG_DEVICE (self), FALSE);
-
- if (!config_specs)
- return FALSE;
-
- /* For compatibility, we allow an untagged MAC address, and for convenience,
- * we allow untagged interface names as well.
- */
- for (i = 0; config_specs[i]; i++) {
- if (g_strcmp0 (config_specs[i], "*") == 0)
- specs = g_slist_prepend (specs, g_strdup (config_specs[i]));
- else if (nm_utils_iface_valid_name (config_specs[i]))
- specs = g_slist_prepend (specs, g_strdup_printf ("interface-name:%s", config_specs[i]));
- else if ( nm_utils_hwaddr_aton (config_specs[i], ARPHRD_ETHER, buf)
- || nm_utils_hwaddr_aton (config_specs[i], ARPHRD_INFINIBAND, buf)) {
- tmp = g_ascii_strdown (config_specs[i], -1);
- specs = g_slist_prepend (specs, g_strdup_printf ("mac:%s", tmp));
- g_free (tmp);
- } else
- specs = g_slist_prepend (specs, g_strdup (config_specs[i]));
- }
-
- specs = g_slist_reverse (specs);
-
- match = NM_CONFIG_DEVICE_GET_INTERFACE (self)->spec_match_list (self, specs);
-
- g_slist_free_full (specs, g_free);
- return match;
-}
-
-char *
-nm_config_device_get_hwaddr (NMConfigDevice *self)
-{
- const guint8 *bytes;
- guint len = 0;
-
- bytes = NM_CONFIG_DEVICE_GET_INTERFACE (self)->get_hw_address (self, &len);
- return nm_utils_hwaddr_ntoa_len (bytes, len);
-}
diff --git a/src/config/nm-config-device.h b/src/config/nm-config-device.h
deleted file mode 100644
index 8b5409a02a..0000000000
--- a/src/config/nm-config-device.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
-/* NetworkManager -- Network link manager
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2013 Red Hat, Inc.
- */
-
-#ifndef NM_CONFIG_DEVICE_H
-#define NM_CONFIG_DEVICE_H
-
-#include <glib-object.h>
-
-#define NM_TYPE_CONFIG_DEVICE (nm_config_device_get_type ())
-#define NM_CONFIG_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONFIG_DEVICE, NMConfigDevice))
-#define NM_IS_CONFIG_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONFIG_DEVICE))
-#define NM_CONFIG_DEVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_CONFIG_DEVICE, NMConfigDeviceInterface))
-
-typedef struct _NMConfigDevice NMConfigDevice;
-typedef struct _NMConfigDeviceInterface NMConfigDeviceInterface;
-
-struct _NMConfigDeviceInterface {
- GTypeInterface g_iface;
-
- /* Methods */
- gboolean (*spec_match_list) (NMConfigDevice *device, const GSList *specs);
- const guint8 * (* get_hw_address) (NMConfigDevice *device, guint *out_len);
-};
-
-GType nm_config_device_get_type (void);
-
-gboolean nm_config_device_spec_match_list (NMConfigDevice *device, const char **config_specs);
-char *nm_config_device_get_hwaddr (NMConfigDevice *device);
-
-#endif /* NM_CONFIG_DEVICE_H */
diff --git a/src/config/nm-config.c b/src/config/nm-config.c
index 32874f649d..711cf4687c 100644
--- a/src/config/nm-config.c
+++ b/src/config/nm-config.c
@@ -27,6 +27,7 @@
#include "nm-logging.h"
#include "nm-utils.h"
#include "nm-glib-compat.h"
+#include "nm-device.h"
#include <gio/gio.h>
#include <glib/gi18n.h>
@@ -177,11 +178,20 @@ nm_config_get_value (NMConfig *config, const char *group, const char *key, GErro
}
gboolean
-nm_config_get_ignore_carrier (NMConfig *config, NMConfigDevice *device)
+nm_config_get_ignore_carrier (NMConfig *config, NMDevice *device)
{
NMConfigPrivate *priv = NM_CONFIG_GET_PRIVATE (config);
+ GSList *specs = NULL;
+ int i;
+ gboolean match;
+
+ for (i = 0; priv->ignore_carrier[i]; i++)
+ specs = g_slist_prepend (specs, priv->ignore_carrier[i]);
+
+ match = nm_device_spec_match_list (device, specs);
- return nm_config_device_spec_match_list (device, (const char **) priv->ignore_carrier);
+ g_slist_free (specs);
+ return match;
}
/************************************************************************/
@@ -227,18 +237,29 @@ merge_no_auto_default_state (NMConfig *config)
}
gboolean
-nm_config_get_ethernet_can_auto_default (NMConfig *config, NMConfigDevice *device)
+nm_config_get_ethernet_can_auto_default (NMConfig *config, NMDevice *device)
{
NMConfigPrivate *priv = NM_CONFIG_GET_PRIVATE (config);
+ GSList *specs = NULL;
+ int i;
+ gboolean match;
+
+ for (i = 0; priv->no_auto_default[i]; i++)
+ specs = g_slist_prepend (specs, priv->no_auto_default[i]);
+
+ match = nm_device_spec_match_list (device, specs);
- return !nm_config_device_spec_match_list (device, (const char **) priv->no_auto_default);
+ g_slist_free (specs);
+ return !match;
}
void
-nm_config_set_ethernet_no_auto_default (NMConfig *config, NMConfigDevice *device)
+nm_config_set_ethernet_no_auto_default (NMConfig *config, NMDevice *device)
{
NMConfigPrivate *priv = NM_CONFIG_GET_PRIVATE (config);
- char *current;
+ const guint8 *hwaddr;
+ guint hwaddr_len;
+ char *current, *hwaddr_str;
GString *updated;
GError *error = NULL;
@@ -253,7 +274,10 @@ nm_config_set_ethernet_no_auto_default (NMConfig *config, NMConfigDevice *device
g_string_append_c (updated, '\n');
}
- g_string_append (updated, nm_config_device_get_hwaddr (device));
+ hwaddr = nm_device_get_hw_address (device, &hwaddr_len);
+ hwaddr_str = nm_utils_hwaddr_ntoa_len (hwaddr, hwaddr_len);
+ g_string_append (updated, hwaddr_str);
+ g_free (hwaddr_str);
g_string_append_c (updated, '\n');
if (!g_file_set_contents (priv->no_auto_default_file, updated->str, updated->len, &error)) {
diff --git a/src/config/nm-config.h b/src/config/nm-config.h
index 2e335c7165..aeb0ce8441 100644
--- a/src/config/nm-config.h
+++ b/src/config/nm-config.h
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
-#include "nm-config-device.h"
+#include "nm-types.h"
G_BEGIN_DECLS
@@ -61,10 +61,10 @@ const char *nm_config_get_connectivity_uri (NMConfig *config);
const guint nm_config_get_connectivity_interval (NMConfig *config);
const char *nm_config_get_connectivity_response (NMConfig *config);
-gboolean nm_config_get_ethernet_can_auto_default (NMConfig *config, NMConfigDevice *device);
-void nm_config_set_ethernet_no_auto_default (NMConfig *config, NMConfigDevice *device);
+gboolean nm_config_get_ethernet_can_auto_default (NMConfig *config, NMDevice *device);
+void nm_config_set_ethernet_no_auto_default (NMConfig *config, NMDevice *device);
-gboolean nm_config_get_ignore_carrier (NMConfig *config, NMConfigDevice *device);
+gboolean nm_config_get_ignore_carrier (NMConfig *config, NMDevice *device);
char *nm_config_get_value (NMConfig *config, const char *group, const char *key, GError **error);
diff --git a/src/config/tests/Makefile.am b/src/config/tests/Makefile.am
index 8d5a5b6d99..dc0f308bab 100644
--- a/src/config/tests/Makefile.am
+++ b/src/config/tests/Makefile.am
@@ -2,10 +2,13 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
+ -I$(top_srcdir)/src/ \
-I$(top_srcdir)/src/config \
+ -I$(top_srcdir)/src/devices \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
+ $(DBUS_CFLAGS) \
-DSRCDIR=\""$(srcdir)"\"
noinst_PROGRAMS = \
diff --git a/src/config/tests/nm-test-device.c b/src/config/tests/nm-test-device.c
index b671f2558e..fcfc63a7db 100644
--- a/src/config/tests/nm-test-device.c
+++ b/src/config/tests/nm-test-device.c
@@ -24,78 +24,82 @@
#include <netinet/ether.h>
#include "nm-test-device.h"
-#include "nm-config-device.h"
-#include "nm-utils.h"
+#include "nm-device-private.h"
-static void nm_test_device_config_device_interface_init (NMConfigDeviceInterface *iface);
+static GObjectClass *g_object_class;
-G_DEFINE_TYPE_WITH_CODE (NMTestDevice, nm_test_device, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (NM_TYPE_CONFIG_DEVICE, nm_test_device_config_device_interface_init))
+G_DEFINE_TYPE (NMTestDevice, nm_test_device, NM_TYPE_DEVICE)
static void
nm_test_device_init (NMTestDevice *self)
{
}
+/* We jump over NMDevice's construct/destruct methods, which require NMPlatform
+ * and NMConnectionProvider to be initialized.
+ */
+
+static GObject*
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ return g_object_class->constructor (type,
+ n_construct_params,
+ construct_params);
+}
+
static void
-finalize (GObject *object)
+constructed (GObject *object)
{
- NMTestDevice *self = NM_TEST_DEVICE (object);
+ NMDevice *device = NM_DEVICE (object);
- g_free (self->hwaddr);
- g_free (self->hwaddr_bytes);
+ nm_device_update_hw_address (device);
- G_OBJECT_CLASS (nm_test_device_parent_class)->finalize (object);
+ g_object_class->constructed (object);
}
static void
-nm_test_device_class_init (NMTestDeviceClass *klass)
+dispose (GObject *object)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->finalize = finalize;
+ g_object_class->dispose (object);
}
-static gboolean
-spec_match_list (NMConfigDevice *device, const GSList *specs)
+static void
+finalize (GObject *object)
{
- NMTestDevice *self = NM_TEST_DEVICE (device);
- const GSList *iter;
- const char *spec;
-
- for (iter = specs; iter; iter = iter->next) {
- spec = iter->data;
- if (g_str_has_prefix (spec, "mac:") && !strcmp (spec + 4, self->hwaddr))
- return TRUE;
- }
- return FALSE;
+ g_object_class->finalize (object);
}
-static const guint8 *
-get_hw_address (NMConfigDevice *device, guint *out_len)
+static guint
+get_hw_address_length (NMDevice *dev, gboolean *out_permanent)
{
- NMTestDevice *self = NM_TEST_DEVICE (device);
-
- if (out_len)
- *out_len = ETH_ALEN;
- return self->hwaddr_bytes;
+ if (out_permanent)
+ *out_permanent = TRUE;
+ return ETH_ALEN;
}
static void
-nm_test_device_config_device_interface_init (NMConfigDeviceInterface *iface)
+nm_test_device_class_init (NMTestDeviceClass *klass)
{
- iface->spec_match_list = spec_match_list;
- iface->get_hw_address = get_hw_address;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMDeviceClass *device_class = NM_DEVICE_CLASS (klass);
+
+ g_object_class = g_type_class_peek (G_TYPE_OBJECT);
+
+ object_class->constructor = constructor;
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+
+ device_class->get_hw_address_length = get_hw_address_length;
}
-NMTestDevice *
+NMDevice *
nm_test_device_new (const char *hwaddr)
{
- NMTestDevice *self = g_object_new (NM_TYPE_TEST_DEVICE, NULL);
-
- self->hwaddr = g_strdup (hwaddr);
- self->hwaddr_bytes = g_malloc (ETH_ALEN);
- nm_utils_hwaddr_aton (hwaddr, ARPHRD_ETHER, self->hwaddr_bytes);
-
- return self;
+ return g_object_new (NM_TYPE_TEST_DEVICE,
+ NM_DEVICE_IFACE, "dummy:",
+ NM_DEVICE_HW_ADDRESS, hwaddr,
+ NULL);
}
diff --git a/src/config/tests/nm-test-device.h b/src/config/tests/nm-test-device.h
index ad63bf5fd2..5c4f28b51e 100644
--- a/src/config/tests/nm-test-device.h
+++ b/src/config/tests/nm-test-device.h
@@ -21,7 +21,7 @@
#ifndef NM_TEST_DEVICE_H
#define NM_TEST_DEVICE_H
-#include <glib-object.h>
+#include <nm-device.h>
G_BEGIN_DECLS
@@ -33,19 +33,17 @@ G_BEGIN_DECLS
#define NM_TEST_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_TEST_DEVICE, NMTestDeviceClass))
typedef struct {
- GObject parent;
+ NMDevice parent;
- char *hwaddr;
- guint8 *hwaddr_bytes;
} NMTestDevice;
typedef struct {
- GObjectClass parent;
+ NMDeviceClass parent;
} NMTestDeviceClass;
GType nm_test_device_get_type (void);
-NMTestDevice *nm_test_device_new (const char *hwaddr);
+NMDevice *nm_test_device_new (const char *hwaddr);
G_END_DECLS
diff --git a/src/config/tests/test-config.c b/src/config/tests/test-config.c
index fb6baaccaf..fff2d2a092 100644
--- a/src/config/tests/test-config.c
+++ b/src/config/tests/test-config.c
@@ -163,7 +163,7 @@ test_config_no_auto_default (void)
GError *error = NULL;
int fd, nwrote;
char *state_file;
- NMTestDevice *dev1, *dev2, *dev3, *dev4;
+ NMDevice *dev1, *dev2, *dev3, *dev4;
fd = g_file_open_tmp (NULL, &state_file, &error);
g_assert_no_error (error);
@@ -185,13 +185,13 @@ test_config_no_auto_default (void)
dev3 = nm_test_device_new ("33:33:33:33:33:33");
dev4 = nm_test_device_new ("44:44:44:44:44:44");
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev1)));
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev2)));
- g_assert (nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev3)));
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev4)));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev1));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev2));
+ g_assert (nm_config_get_ethernet_can_auto_default (config, dev3));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev4));
- nm_config_set_ethernet_no_auto_default (config, NM_CONFIG_DEVICE (dev3));
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev3)));
+ nm_config_set_ethernet_no_auto_default (config, dev3);
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev3));
g_object_unref (config);
@@ -201,10 +201,10 @@ test_config_no_auto_default (void)
config = nm_config_new (&error);
g_assert_no_error (error);
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev1)));
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev2)));
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev3)));
- g_assert (!nm_config_get_ethernet_can_auto_default (config, NM_CONFIG_DEVICE (dev4)));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev1));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev2));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev3));
+ g_assert (!nm_config_get_ethernet_can_auto_default (config, dev4));
g_object_unref (config);
diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am
index 50024b3ee9..1770a7fd9d 100644
--- a/src/devices/adsl/Makefile.am
+++ b/src/devices/adsl/Makefile.am
@@ -7,17 +7,13 @@ AM_CPPFLAGS = \
-I${top_builddir}/src \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src/devices \
- -I${top_srcdir}/src/settings \
-I${top_srcdir}/src/platform \
- -I${top_srcdir}/src/ppp-manager \
-I${top_srcdir}/include \
-I${top_builddir}/libnm-util \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(LIBNL_CFLAGS) \
$(GUDEV_CFLAGS)
GLIB_GENERATED = nm-adsl-enum-types.h nm-adsl-enum-types.c
diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am
index fa1a40fb74..41dda9ad13 100644
--- a/src/devices/bluetooth/Makefile.am
+++ b/src/devices/bluetooth/Makefile.am
@@ -15,10 +15,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(LIBNL_CFLAGS) \
- $(GUDEV_CFLAGS)
+ $(DBUS_CFLAGS)
GLIB_GENERATED = nm-bt-enum-types.h nm-bt-enum-types.c
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
diff --git a/src/devices/nm-device-factory.h b/src/devices/nm-device-factory.h
index ef412c96d2..b0b7267782 100644
--- a/src/devices/nm-device-factory.h
+++ b/src/devices/nm-device-factory.h
@@ -25,7 +25,6 @@
#include <glib-object.h>
#include "NetworkManager.h"
-#include "nm-platform.h"
#include "nm-device.h"
/* WARNING: this file is private API between NetworkManager and its internal
diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c
index 8ec79157fb..5861e0f473 100644
--- a/src/devices/nm-device-infiniband.c
+++ b/src/devices/nm-device-infiniband.c
@@ -33,6 +33,9 @@
#include "nm-device-private.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
+#include "nm-activation-request.h"
+#include "nm-ip4-config.h"
+#include "nm-platform.h"
#include "nm-device-infiniband-glue.h"
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c
index ab4b79f48c..4ee89cd00b 100644
--- a/src/devices/nm-device-vlan.c
+++ b/src/devices/nm-device-vlan.c
@@ -35,6 +35,9 @@
#include "nm-device-private.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
+#include "nm-connection-provider.h"
+#include "nm-activation-request.h"
+#include "nm-ip4-config.h"
#include "nm-platform.h"
#include "nm-utils.h"
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index ba9a675eae..b3de5580f5 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -51,11 +51,15 @@
#include "nm-dbus-manager.h"
#include "nm-utils.h"
#include "nm-logging.h"
+#include "nm-activation-request.h"
#include "nm-setting-ip4-config.h"
+#include "nm-ip4-config.h"
#include "nm-setting-ip6-config.h"
+#include "nm-ip6-config.h"
#include "nm-setting-connection.h"
#include "nm-dnsmasq-manager.h"
#include "nm-dhcp4-config.h"
+#include "nm-dhcp6-config.h"
#include "nm-rfkill-manager.h"
#include "nm-firewall-manager.h"
#include "nm-properties-changed-signal.h"
@@ -66,7 +70,6 @@
#include "nm-manager-auth.h"
#include "nm-dbus-glib-types.h"
#include "nm-dispatcher.h"
-#include "nm-config-device.h"
#include "nm-config.h"
#include "nm-dns-manager.h"
@@ -75,10 +78,7 @@ static void impl_device_delete (NMDevice *device, DBusGMethodInvocation *con
#include "nm-device-glue.h"
-static void nm_device_config_device_interface_init (NMConfigDeviceInterface *iface);
-
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (NMDevice, nm_device, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (NM_TYPE_CONFIG_DEVICE, nm_device_config_device_interface_init))
+G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, G_TYPE_OBJECT)
#define NM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE, NMDevicePrivate))
@@ -7139,13 +7139,6 @@ nm_device_init (NMDevice *self)
priv->ip6_saved_properties = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
}
-static void
-nm_device_config_device_interface_init (NMConfigDeviceInterface *iface)
-{
- iface->spec_match_list = (gboolean (*) (NMConfigDevice *, const GSList *)) nm_device_spec_match_list;
- iface->get_hw_address = (const guint8 * (*) (NMConfigDevice *, guint *)) nm_device_get_hw_address;
-}
-
/*
* Get driver info from SIOCETHTOOL ioctl() for 'iface'
* Returns driver and firmware versions to 'driver_version and' 'firmware_version'
@@ -7252,7 +7245,7 @@ constructed (GObject *object)
/* Have to call update_initial_hw_address() before calling get_ignore_carrier() */
if (device_has_capability (dev, NM_DEVICE_CAP_CARRIER_DETECT)) {
- priv->ignore_carrier = nm_config_get_ignore_carrier (nm_config_get (), NM_CONFIG_DEVICE (dev));
+ priv->ignore_carrier = nm_config_get_ignore_carrier (nm_config_get (), dev);
check_carrier (dev);
nm_log_info (LOGD_HW,
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index e0f5b89d8c..3d45ccf3a9 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -28,15 +28,8 @@
#include "NetworkManager.h"
#include "nm-types.h"
-#include "nm-activation-request.h"
-#include "nm-ip4-config.h"
-#include "nm-ip6-config.h"
-#include "nm-dhcp4-config.h"
-#include "nm-dhcp6-config.h"
#include "nm-connection.h"
#include "nm-rfkill-manager.h"
-#include "nm-connection-provider.h"
-#include "nm-platform.h"
/* Properties */
#define NM_DEVICE_UDI "udi"
diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am
index f54de6ba2a..1358cca47e 100644
--- a/src/devices/team/Makefile.am
+++ b/src/devices/team/Makefile.am
@@ -7,7 +7,6 @@ AM_CPPFLAGS = \
-I${top_builddir}/src \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src/devices \
- -I${top_srcdir}/src/settings \
-I${top_srcdir}/src/platform \
-I${top_srcdir}/src/posix-signals \
-I${top_srcdir}/include \
@@ -15,10 +14,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-team"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(LIBNL_CFLAGS) \
- $(GUDEV_CFLAGS)
+ $(DBUS_CFLAGS)
if WITH_TEAMDCTL
AM_CPPFLAGS += ${LIBTEAMDCTL_CFLAGS}
diff --git a/src/devices/team/nm-team-factory.c b/src/devices/team/nm-team-factory.c
index ab97de320b..49e5945c70 100644
--- a/src/devices/team/nm-team-factory.c
+++ b/src/devices/team/nm-team-factory.c
@@ -26,6 +26,7 @@
#include "nm-team-factory.h"
#include "nm-device-team.h"
#include "nm-logging.h"
+#include "nm-platform.h"
static GType nm_team_factory_get_type (void);
diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am
index 211e38f43a..59f279d7f4 100644
--- a/src/devices/wifi/Makefile.am
+++ b/src/devices/wifi/Makefile.am
@@ -17,10 +17,7 @@ AM_CPPFLAGS = \
-I${top_srcdir}/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(LIBNL_CFLAGS) \
- $(GUDEV_CFLAGS)
+ $(DBUS_CFLAGS)
GLIB_GENERATED = nm-wifi-enum-types.h nm-wifi-enum-types.c
GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c
index 1320fe0416..293e757544 100644
--- a/src/devices/wifi/nm-device-olpc-mesh.c
+++ b/src/devices/wifi/nm-device-olpc-mesh.c
@@ -53,6 +53,7 @@
#include "nm-manager.h"
#include "nm-enum-types.h"
#include "nm-dbus-manager.h"
+#include "nm-platform.h"
#include "nm-wifi-enum-types.h"
/* This is a bug; but we can't really change API now... */
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 8df3383991..3c8fb87a2d 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -52,6 +52,7 @@
#include "nm-setting-wireless-security.h"
#include "nm-setting-8021x.h"
#include "nm-setting-ip4-config.h"
+#include "nm-ip4-config.h"
#include "nm-setting-ip6-config.h"
#include "nm-platform.h"
#include "nm-manager-auth.h"
diff --git a/src/devices/wifi/nm-wifi-factory.c b/src/devices/wifi/nm-wifi-factory.c
index 02ad93f46d..5d52d66c40 100644
--- a/src/devices/wifi/nm-wifi-factory.c
+++ b/src/devices/wifi/nm-wifi-factory.c
@@ -24,6 +24,7 @@
#include "nm-device-wifi.h"
#include "nm-device-olpc-mesh.h"
#include "nm-settings-connection.h"
+#include "nm-platform.h"
#define NM_TYPE_WIFI_FACTORY (nm_wifi_factory_get_type ())
#define NM_WIFI_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIFI_FACTORY, NMWifiFactory))
diff --git a/src/devices/wifi/tests/Makefile.am b/src/devices/wifi/tests/Makefile.am
index e90fd23043..7cdd149650 100644
--- a/src/devices/wifi/tests/Makefile.am
+++ b/src/devices/wifi/tests/Makefile.am
@@ -2,7 +2,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
- -I$(top_srcdir)/src/platform \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/devices/wifi \
diff --git a/src/devices/wimax/Makefile.am b/src/devices/wimax/Makefile.am
index 28a0758b2c..2e4524824f 100644
--- a/src/devices/wimax/Makefile.am
+++ b/src/devices/wimax/Makefile.am
@@ -10,10 +10,7 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\""NetworkManager-wimax"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(IWMX_SDK_CFLAGS) \
- $(LIBNL_CFLAGS) \
- $(GUDEV_CFLAGS)
+ $(IWMX_SDK_CFLAGS)
pkglib_LTLIBRARIES = libnm-device-plugin-wimax.la
diff --git a/src/devices/wimax/nm-device-wimax.c b/src/devices/wimax/nm-device-wimax.c
index 6b78755aa7..daf8e10931 100644
--- a/src/devices/wimax/nm-device-wimax.c
+++ b/src/devices/wimax/nm-device-wimax.c
@@ -36,8 +36,10 @@
#include "nm-logging.h"
#include "nm-device-private.h"
#include "NetworkManagerUtils.h"
+#include "nm-active-connection.h"
#include "nm-dbus-manager.h"
#include "nm-connection.h"
+#include "nm-platform.h"
#include "nm-setting-connection.h"
#include "nm-setting-wimax.h"
#include "nm-utils.h"
diff --git a/src/devices/wimax/nm-wimax-factory.c b/src/devices/wimax/nm-wimax-factory.c
index ca962e6866..e3aa0be676 100644
--- a/src/devices/wimax/nm-wimax-factory.c
+++ b/src/devices/wimax/nm-wimax-factory.c
@@ -22,6 +22,7 @@
#include "nm-device-factory.h"
#include "nm-device-wimax.h"
+#include "nm-platform.h"
#define NM_TYPE_WIMAX_FACTORY (nm_wimax_factory_get_type ())
#define NM_WIMAX_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_WIMAX_FACTORY, NMWimaxFactory))
diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am
index b8c079eaf7..d483177d8f 100644
--- a/src/devices/wwan/Makefile.am
+++ b/src/devices/wwan/Makefile.am
@@ -15,7 +15,6 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
$(MM_GLIB_CFLAGS)
BUILT_SOURCES = $(null)
diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c
index 27255660ee..6f0f6bd2ba 100644
--- a/src/devices/wwan/nm-modem-broadband.c
+++ b/src/devices/wwan/nm-modem-broadband.c
@@ -26,6 +26,7 @@
#include "nm-logging.h"
#include "NetworkManagerUtils.h"
#include "nm-device-private.h"
+#include "nm-platform.h"
G_DEFINE_TYPE (NMModemBroadband, nm_modem_broadband, NM_TYPE_MODEM)
diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c
index 7fda8646f5..1fe7733109 100644
--- a/src/dhcp-manager/nm-dhcp-client.c
+++ b/src/dhcp-manager/nm-dhcp-client.c
@@ -34,6 +34,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-dhcp-client.h"
#include "nm-dhcp-utils.h"
+#include "nm-platform.h"
typedef struct {
char * iface;
diff --git a/src/dhcp-manager/nm-dhcp-dhclient-utils.c b/src/dhcp-manager/nm-dhcp-dhclient-utils.c
index bc9de12bd8..7991181f90 100644
--- a/src/dhcp-manager/nm-dhcp-dhclient-utils.c
+++ b/src/dhcp-manager/nm-dhcp-dhclient-utils.c
@@ -27,6 +27,7 @@
#include "nm-dhcp-dhclient-utils.h"
#include "nm-ip4-config.h"
#include "nm-utils.h"
+#include "nm-platform.h"
#include "NetworkManagerUtils.h"
#define CLIENTID_TAG "send dhcp-client-identifier"
diff --git a/src/dhcp-manager/nm-dhcp-utils.c b/src/dhcp-manager/nm-dhcp-utils.c
index 48330e5113..c017f6cfb3 100644
--- a/src/dhcp-manager/nm-dhcp-utils.c
+++ b/src/dhcp-manager/nm-dhcp-utils.c
@@ -27,6 +27,7 @@
#include "nm-dhcp-utils.h"
#include "nm-utils.h"
#include "NetworkManagerUtils.h"
+#include "nm-platform.h"
/********************************************/
diff --git a/src/dhcp-manager/tests/test-dhcp-dhclient.c b/src/dhcp-manager/tests/test-dhcp-dhclient.c
index 1ab182a7c0..7b8bcef2ca 100644
--- a/src/dhcp-manager/tests/test-dhcp-dhclient.c
+++ b/src/dhcp-manager/tests/test-dhcp-dhclient.c
@@ -25,6 +25,7 @@
#include "nm-dhcp-dhclient-utils.h"
#include "nm-utils.h"
#include "nm-ip4-config.h"
+#include "nm-platform.h"
#define DEBUG 0
diff --git a/src/dhcp-manager/tests/test-dhcp-options.c b/src/dhcp-manager/tests/test-dhcp-options.c
index ac6c22a6c3..15f5ee60b5 100644
--- a/src/dhcp-manager/tests/test-dhcp-options.c
+++ b/src/dhcp-manager/tests/test-dhcp-options.c
@@ -26,6 +26,7 @@
#include "nm-dhcp-utils.h"
#include "nm-logging.h"
+#include "nm-platform.h"
#include "nm-test-utils.h"
diff --git a/src/dns-manager/nm-dns-utils.c b/src/dns-manager/nm-dns-utils.c
index 3e564ace33..334866cb69 100644
--- a/src/dns-manager/nm-dns-utils.c
+++ b/src/dns-manager/nm-dns-utils.c
@@ -21,6 +21,7 @@
#include <string.h>
#include "nm-dns-utils.h"
+#include "nm-platform.h"
#include "nm-utils.h"
static void
diff --git a/src/main.c b/src/main.c
index 57e0b873f3..6886586940 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,6 +55,7 @@
#include "nm-posix-signals.h"
#include "nm-session-monitor.h"
#include "nm-dispatcher.h"
+#include "nm-settings.h"
#if !defined(NM_DIST_VERSION)
# define NM_DIST_VERSION VERSION
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
index 97db7eb867..115c7d4245 100644
--- a/src/nm-activation-request.c
+++ b/src/nm-activation-request.c
@@ -37,7 +37,7 @@
#include "nm-active-connection.h"
#include "nm-settings-connection.h"
#include "nm-posix-signals.h"
-
+#include "nm-auth-subject.h"
G_DEFINE_TYPE (NMActRequest, nm_act_request, NM_TYPE_ACTIVE_CONNECTION)
diff --git a/src/nm-activation-request.h b/src/nm-activation-request.h
index 87ea41f916..093c939c7f 100644
--- a/src/nm-activation-request.h
+++ b/src/nm-activation-request.h
@@ -23,6 +23,7 @@
#include <glib.h>
#include <glib-object.h>
+
#include "nm-types.h"
#include "nm-connection.h"
#include "nm-active-connection.h"
@@ -35,9 +36,9 @@
#define NM_IS_ACT_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_ACT_REQUEST))
#define NM_ACT_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ACT_REQUEST, NMActRequestClass))
-typedef struct {
+struct _NMActRequest {
NMActiveConnection parent;
-} NMActRequest;
+};
typedef struct {
NMActiveConnectionClass parent;
diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c
index 0a35d51068..c679e4505b 100644
--- a/src/nm-active-connection.c
+++ b/src/nm-active-connection.c
@@ -28,6 +28,7 @@
#include "nm-device.h"
#include "nm-settings-connection.h"
#include "nm-manager-auth.h"
+#include "nm-auth-subject.h"
#include "NetworkManagerUtils.h"
#include "nm-active-connection-glue.h"
diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h
index 0d96c87236..2609ed9ddf 100644
--- a/src/nm-active-connection.h
+++ b/src/nm-active-connection.h
@@ -24,7 +24,6 @@
#include <glib-object.h>
#include "nm-types.h"
#include "nm-connection.h"
-#include "nm-auth-subject.h"
#define NM_TYPE_ACTIVE_CONNECTION (nm_active_connection_get_type ())
#define NM_ACTIVE_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ACTIVE_CONNECTION, NMActiveConnection))
@@ -57,9 +56,9 @@
#define NM_ACTIVE_CONNECTION_INT_MASTER "int-master"
#define NM_ACTIVE_CONNECTION_INT_MASTER_READY "int-master-ready"
-typedef struct {
+struct _NMActiveConnection {
GObject parent;
-} NMActiveConnection;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-auth-subject.h b/src/nm-auth-subject.h
index 063598902d..41dc3f439b 100644
--- a/src/nm-auth-subject.h
+++ b/src/nm-auth-subject.h
@@ -31,6 +31,8 @@
#include <polkit/polkit.h>
#endif
+#include "nm-types.h"
+
#define NM_TYPE_AUTH_SUBJECT (nm_auth_subject_get_type ())
#define NM_AUTH_SUBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_AUTH_SUBJECT, NMAuthSubject))
#define NM_AUTH_SUBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_AUTH_SUBJECT, NMAuthSubjectClass))
@@ -38,9 +40,9 @@
#define NM_IS_AUTH_SUBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_AUTH_SUBJECT))
#define NM_AUTH_SUBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_AUTH_SUBJECT, NMAuthSubjectClass))
-typedef struct {
+struct _NMAuthSubject {
GObject parent;
-} NMAuthSubject;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-connection-provider.h b/src/nm-connection-provider.h
index 5093d05536..62f3295e33 100644
--- a/src/nm-connection-provider.h
+++ b/src/nm-connection-provider.h
@@ -19,13 +19,13 @@
#include <glib-object.h>
#include <nm-connection.h>
+#include "nm-types.h"
+
#define NM_TYPE_CONNECTION_PROVIDER (nm_connection_provider_get_type ())
#define NM_CONNECTION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_PROVIDER, NMConnectionProvider))
#define NM_IS_CONNECTION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_PROVIDER))
#define NM_CONNECTION_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NM_TYPE_CONNECTION_PROVIDER, NMConnectionProvider))
-typedef struct _NMConnectionProvider NMConnectionProvider;
-
#define NM_CP_SIGNAL_CONNECTION_ADDED "cp-connection-added"
#define NM_CP_SIGNAL_CONNECTION_UPDATED "cp-connection-updated"
#define NM_CP_SIGNAL_CONNECTION_REMOVED "cp-connection-removed"
diff --git a/src/nm-connectivity.h b/src/nm-connectivity.h
index 04d0f2a309..3c9175041e 100644
--- a/src/nm-connectivity.h
+++ b/src/nm-connectivity.h
@@ -26,6 +26,7 @@
#include <gio/gio.h>
#include "NetworkManager.h"
+#include "nm-types.h"
#define NM_TYPE_CONNECTIVITY (nm_connectivity_get_type ())
#define NM_CONNECTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTIVITY, NMConnectivity))
@@ -40,9 +41,9 @@
#define NM_CONNECTIVITY_RESPONSE "response"
#define NM_CONNECTIVITY_STATE "state"
-typedef struct {
+struct _NMConnectivity {
GObject parent;
-} NMConnectivity;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-dbus-manager.h b/src/nm-dbus-manager.h
index 7895a20375..cc7f3210fd 100644
--- a/src/nm-dbus-manager.h
+++ b/src/nm-dbus-manager.h
@@ -27,6 +27,8 @@
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
+#include "nm-types.h"
+
G_BEGIN_DECLS
typedef gboolean (* NMDBusSignalHandlerFunc) (DBusConnection * connection,
@@ -45,9 +47,9 @@ typedef gboolean (* NMDBusSignalHandlerFunc) (DBusConnection * connection,
#define NM_DBUS_MANAGER_PRIVATE_CONNECTION_NEW "private-connection-new"
#define NM_DBUS_MANAGER_PRIVATE_CONNECTION_DISCONNECTED "private-connection-disconnected"
-typedef struct {
+struct _NMDBusManager {
GObject parent;
-} NMDBusManager;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-dhcp4-config.h b/src/nm-dhcp4-config.h
index 6eb9ee5752..e893f892b7 100644
--- a/src/nm-dhcp4-config.h
+++ b/src/nm-dhcp4-config.h
@@ -24,6 +24,8 @@
#include <glib.h>
#include <glib-object.h>
+#include "nm-types.h"
+
#define NM_TYPE_DHCP4_CONFIG (nm_dhcp4_config_get_type ())
#define NM_DHCP4_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP4_CONFIG, NMDHCP4Config))
#define NM_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP4_CONFIG, NMDHCP4ConfigClass))
@@ -31,9 +33,9 @@
#define NM_IS_DHCP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP4_CONFIG))
#define NM_DHCP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP4_CONFIG, NMDHCP4ConfigClass))
-typedef struct {
+struct _NMDHCP4Config {
GObject parent;
-} NMDHCP4Config;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-dhcp6-config.h b/src/nm-dhcp6-config.h
index 2af6560788..ff61b85897 100644
--- a/src/nm-dhcp6-config.h
+++ b/src/nm-dhcp6-config.h
@@ -24,6 +24,8 @@
#include <glib.h>
#include <glib-object.h>
+#include "nm-types.h"
+
#define NM_TYPE_DHCP6_CONFIG (nm_dhcp6_config_get_type ())
#define NM_DHCP6_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6Config))
#define NM_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass))
@@ -31,9 +33,9 @@
#define NM_IS_DHCP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DHCP6_CONFIG))
#define NM_DHCP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DHCP6_CONFIG, NMDHCP6ConfigClass))
-typedef struct {
+struct _NMDHCP6Config {
GObject parent;
-} NMDHCP6Config;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-dispatcher.c b/src/nm-dispatcher.c
index f955822b4b..2637cc8bcb 100644
--- a/src/nm-dispatcher.c
+++ b/src/nm-dispatcher.c
@@ -30,6 +30,9 @@
#include "nm-utils.h"
#include "nm-logging.h"
#include "nm-dbus-manager.h"
+#include "nm-device.h"
+#include "nm-dhcp4-config.h"
+#include "nm-dhcp6-config.h"
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
diff --git a/src/nm-dispatcher.h b/src/nm-dispatcher.h
index 464f6310cb..4a5b1df1d9 100644
--- a/src/nm-dispatcher.h
+++ b/src/nm-dispatcher.h
@@ -25,9 +25,7 @@
#include <glib.h>
#include <stdio.h>
-#include "nm-device.h"
-#include "nm-ip4-config.h"
-#include "nm-ip6-config.h"
+#include "nm-types.h"
#include "nm-connection.h"
typedef enum {
diff --git a/src/nm-ip4-config.h b/src/nm-ip4-config.h
index c9096bb389..8a8993fd35 100644
--- a/src/nm-ip4-config.h
+++ b/src/nm-ip4-config.h
@@ -23,7 +23,7 @@
#include <glib-object.h>
-#include "nm-platform.h"
+#include "nm-types.h"
#include "nm-setting-ip4-config.h"
#define NM_TYPE_IP4_CONFIG (nm_ip4_config_get_type ())
@@ -33,9 +33,9 @@
#define NM_IS_IP4_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP4_CONFIG))
#define NM_IP4_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP4_CONFIG, NMIP4ConfigClass))
-typedef struct {
+struct _NMIP4Config {
GObject parent;
-} NMIP4Config;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-ip6-config.h b/src/nm-ip6-config.h
index b7b9d83ec7..143ebab026 100644
--- a/src/nm-ip6-config.h
+++ b/src/nm-ip6-config.h
@@ -23,7 +23,7 @@
#include <glib-object.h>
-#include "nm-platform.h"
+#include "nm-types.h"
#include "nm-setting-ip6-config.h"
#define NM_TYPE_IP6_CONFIG (nm_ip6_config_get_type ())
@@ -33,9 +33,9 @@
#define NM_IS_IP6_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_IP6_CONFIG))
#define NM_IP6_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IP6_CONFIG, NMIP6ConfigClass))
-typedef struct {
+struct _NMIP6Config {
GObject parent;
-} NMIP6Config;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-manager-auth.c b/src/nm-manager-auth.c
index 7f8b313097..20722fff84 100644
--- a/src/nm-manager-auth.c
+++ b/src/nm-manager-auth.c
@@ -32,6 +32,7 @@
#include "nm-logging.h"
#include "nm-dbus-manager.h"
#include "nm-auth-subject.h"
+#include "nm-session-monitor.h"
struct NMAuthChain {
guint32 refcount;
diff --git a/src/nm-manager-auth.h b/src/nm-manager-auth.h
index 43dd639873..8fb629bbc1 100644
--- a/src/nm-manager-auth.h
+++ b/src/nm-manager-auth.h
@@ -25,9 +25,7 @@
#include <dbus/dbus-glib.h>
#include <nm-connection.h>
-#include "nm-dbus-manager.h"
-#include "nm-session-monitor.h"
-#include "nm-auth-subject.h"
+#include "nm-types.h"
#define NM_AUTH_PERMISSION_ENABLE_DISABLE_NETWORK "org.freedesktop.NetworkManager.enable-disable-network"
#define NM_AUTH_PERMISSION_SLEEP_WAKE "org.freedesktop.NetworkManager.sleep-wake"
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 520654fb4f..68b1846dc2 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -68,7 +68,9 @@
#include "nm-sleep-monitor.h"
#include "nm-connectivity.h"
#include "nm-policy.h"
-
+#include "nm-connection-provider.h"
+#include "nm-session-monitor.h"
+#include "nm-activation-request.h"
#define NM_AUTOIP_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
#define NM_AUTOIP_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd"
diff --git a/src/nm-manager.h b/src/nm-manager.h
index 81eefc7b00..40c61b2f23 100644
--- a/src/nm-manager.h
+++ b/src/nm-manager.h
@@ -25,9 +25,9 @@
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus-glib.h>
-#include "nm-device.h"
-#include "nm-settings.h"
-#include "nm-auth-subject.h"
+
+#include "nm-types.h"
+#include "nm-connection.h"
#define NM_TYPE_MANAGER (nm_manager_get_type ())
#define NM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_MANAGER, NMManager))
@@ -77,9 +77,9 @@ typedef enum {
#define NM_MANAGER_ACTIVE_CONNECTION_REMOVED "active-connection-removed"
-typedef struct {
+struct _NMManager {
GObject parent;
-} NMManager;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 825c15f8c1..f31894ce2a 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -43,6 +43,11 @@
#include "nm-dispatcher.h"
#include "nm-utils.h"
#include "nm-glib-compat.h"
+#include "nm-manager.h"
+#include "nm-settings.h"
+#include "nm-settings-connection.h"
+#include "nm-dhcp4-config.h"
+#include "nm-dhcp6-config.h"
typedef struct {
NMManager *manager;
diff --git a/src/nm-policy.h b/src/nm-policy.h
index 6e83182a90..141799a873 100644
--- a/src/nm-policy.h
+++ b/src/nm-policy.h
@@ -22,8 +22,7 @@
#ifndef NM_POLICY_H
#define NM_POLICY_H
-#include "nm-manager.h"
-#include "nm-settings.h"
+#include "nm-types.h"
#define NM_TYPE_POLICY (nm_policy_get_type ())
#define NM_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_POLICY, NMPolicy))
@@ -37,9 +36,9 @@
#define NM_POLICY_ACTIVATING_IP4_DEVICE "activating-ip4-device"
#define NM_POLICY_ACTIVATING_IP6_DEVICE "activating-ip6-device"
-typedef struct {
+struct _NMPolicy {
GObject parent;
-} NMPolicy;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-rfkill-manager.h b/src/nm-rfkill-manager.h
index b26261b83f..a507421855 100644
--- a/src/nm-rfkill-manager.h
+++ b/src/nm-rfkill-manager.h
@@ -21,6 +21,8 @@
#include <glib-object.h>
+#include "nm-types.h"
+
#ifndef NM_RFKILL_MANAGER_H
#define NM_RFKILL_MANAGER_H
@@ -51,9 +53,9 @@ typedef enum {
#define NM_IS_RFKILL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_RFKILL_MANAGER))
#define NM_RFKILL_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_RFKILL_MANAGER, NMRfkillManagerClass))
-typedef struct {
+struct _NMRfkillManager {
GObject parent;
-} NMRfkillManager;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/nm-session-monitor.h b/src/nm-session-monitor.h
index 77ea9a0364..ed168248e0 100644
--- a/src/nm-session-monitor.h
+++ b/src/nm-session-monitor.h
@@ -23,6 +23,8 @@
#include <glib-object.h>
+#include "nm-types.h"
+
G_BEGIN_DECLS
#define NM_TYPE_SESSION_MONITOR (nm_session_monitor_get_type ())
@@ -34,7 +36,6 @@ G_BEGIN_DECLS
#define NM_SESSION_MONITOR_CHANGED "changed"
-typedef struct _NMSessionMonitor NMSessionMonitor;
typedef struct _NMSessionMonitorClass NMSessionMonitorClass;
GType nm_session_monitor_get_type (void) G_GNUC_CONST;
diff --git a/src/nm-sleep-monitor.h b/src/nm-sleep-monitor.h
index 173e6a1369..00eeaa03af 100644
--- a/src/nm-sleep-monitor.h
+++ b/src/nm-sleep-monitor.h
@@ -22,6 +22,8 @@
#include <glib-object.h>
+#include "nm-types.h"
+
G_BEGIN_DECLS
#define NM_TYPE_SLEEP_MONITOR (nm_sleep_monitor_get_type ())
@@ -34,7 +36,6 @@ G_BEGIN_DECLS
#define NM_SLEEP_MONITOR_SLEEPING "sleeping"
#define NM_SLEEP_MONITOR_RESUMING "resuming"
-typedef struct _NMSleepMonitor NMSleepMonitor;
typedef struct _NMSleepMonitorClass NMSleepMonitorClass;
GType nm_sleep_monitor_get_type (void) G_GNUC_CONST;
diff --git a/src/nm-types.h b/src/nm-types.h
index c558d7ba51..a08d0f0db1 100644
--- a/src/nm-types.h
+++ b/src/nm-types.h
@@ -21,6 +21,35 @@
#ifndef NM_TYPES_H
#define NM_TYPES_H
-typedef struct _NMDevice NMDevice;
+/* core */
+typedef struct _NMActiveConnection NMActiveConnection;
+typedef struct _NMActRequest NMActRequest;
+typedef struct _NMAuthSubject NMAuthSubject;
+typedef struct _NMConnectionProvider NMConnectionProvider;
+typedef struct _NMConnectivity NMConnectivity;
+typedef struct _NMDBusManager NMDBusManager;
+typedef struct _NMDevice NMDevice;
+typedef struct _NMDHCP4Config NMDHCP4Config;
+typedef struct _NMDHCP6Config NMDHCP6Config;
+typedef struct _NMIP4Config NMIP4Config;
+typedef struct _NMIP6Config NMIP6Config;
+typedef struct _NMManager NMManager;
+typedef struct _NMPolicy NMPolicy;
+typedef struct _NMRfkillManager NMRfkillManager;
+typedef struct _NMSessionMonitor NMSessionMonitor;
+typedef struct _NMSleepMonitor NMSleepMonitor;
+
+/* platform */
+typedef struct _NMPlatformIP4Address NMPlatformIP4Address;
+typedef struct _NMPlatformIP4Route NMPlatformIP4Route;
+typedef struct _NMPlatformIP6Address NMPlatformIP6Address;
+typedef struct _NMPlatformIP6Route NMPlatformIP6Route;
+typedef struct _NMPlatformLink NMPlatformLink;
+
+/* settings */
+typedef struct _NMAgentManager NMAgentManager;
+typedef struct _NMSecretAgent NMSecretAgent;
+typedef struct _NMSettings NMSettings;
+typedef struct _NMSettingsConnection NMSettingsConnection;
#endif /* NM_TYPES_H */
diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h
index 9bdc6a9cb1..844727391f 100644
--- a/src/platform/nm-platform.h
+++ b/src/platform/nm-platform.h
@@ -30,6 +30,7 @@
#include <NetworkManager.h>
#include "gsystem-local-alloc.h"
+#include "nm-types.h"
#define NM_TYPE_PLATFORM (nm_platform_get_type ())
#define NM_PLATFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_PLATFORM, NMPlatform))
@@ -120,7 +121,7 @@ typedef enum {
int ifindex; \
;
-typedef struct {
+struct _NMPlatformLink {
__NMPlatformObject_COMMON;
char name[IFNAMSIZ];
NMLinkType type;
@@ -133,7 +134,7 @@ typedef struct {
gboolean connected;
gboolean arp;
guint mtu;
-} NMPlatformLink;
+};
typedef enum {
NM_PLATFORM_SIGNAL_ADDED,
@@ -208,24 +209,24 @@ typedef struct {
* NMPlatformIP4Address:
* @timestamp: timestamp as returned by nm_utils_get_monotonic_timestamp_s()
**/
-typedef struct {
+struct _NMPlatformIP4Address {
__NMPlatformIPAddress_COMMON;
in_addr_t address;
in_addr_t peer_address; /* PTP peer address */
char label[IFNAMSIZ];
-} NMPlatformIP4Address;
+};
G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPAddress, address_ptr) == G_STRUCT_OFFSET (NMPlatformIP4Address, address));
/**
* NMPlatformIP6Address:
* @timestamp: timestamp as returned by nm_utils_get_monotonic_timestamp_s()
**/
-typedef struct {
+struct _NMPlatformIP6Address {
__NMPlatformIPAddress_COMMON;
struct in6_addr address;
struct in6_addr peer_address;
guint flags; /* ifa_flags from <linux/if_addr.h>, field type "unsigned int" is as used in rtnl_addr_get_flags. */
-} NMPlatformIP6Address;
+};
G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPAddress, address_ptr) == G_STRUCT_OFFSET (NMPlatformIP6Address, address));
#undef __NMPlatformIPAddress_COMMON
@@ -249,18 +250,18 @@ typedef struct {
};
} NMPlatformIPRoute;
-typedef struct {
+struct _NMPlatformIP4Route {
__NMPlatformIPRoute_COMMON;
in_addr_t network;
in_addr_t gateway;
-} NMPlatformIP4Route;
+};
G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPRoute, network_ptr) == G_STRUCT_OFFSET (NMPlatformIP4Route, network));
-typedef struct {
+struct _NMPlatformIP6Route {
__NMPlatformIPRoute_COMMON;
struct in6_addr network;
struct in6_addr gateway;
-} NMPlatformIP6Route;
+};
G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPRoute, network_ptr) == G_STRUCT_OFFSET (NMPlatformIP6Route, network));
#undef __NMPlatformIPRoute_COMMON
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index f7a743cc0b..7a837fbce4 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -54,6 +54,7 @@
#include "nm-dbus-manager.h"
#include "nm-logging.h"
#include "nm-posix-signals.h"
+#include "nm-platform.h"
static void impl_ppp_manager_need_secrets (NMPPPManager *manager,
DBusGMethodInvocation *context);
diff --git a/src/rdisc/nm-lndp-rdisc.c b/src/rdisc/nm-lndp-rdisc.c
index cf0267d1c6..0f0a00e86c 100644
--- a/src/rdisc/nm-lndp-rdisc.c
+++ b/src/rdisc/nm-lndp-rdisc.c
@@ -28,6 +28,7 @@
#include "NetworkManagerUtils.h"
#include "nm-logging.h"
+#include "nm-platform.h"
#define debug(...) nm_log_dbg (LOGD_IP6, __VA_ARGS__)
#define warning(...) nm_log_warn (LOGD_IP6, __VA_ARGS__)
diff --git a/src/rdisc/tests/Makefile.am b/src/rdisc/tests/Makefile.am
index 27a55da878..a16f45d671 100644
--- a/src/rdisc/tests/Makefile.am
+++ b/src/rdisc/tests/Makefile.am
@@ -2,19 +2,14 @@ AM_CPPFLAGS = \
-I${top_srcdir} \
-I$(top_srcdir)/include \
-I${top_srcdir}/src \
- -I${top_srcdir}/src/devices \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/src/platform \
- -I${top_srcdir}/src/posix-signals \
-I${top_srcdir}/libnm-util \
-I${top_builddir}/libnm-util \
-I${srcdir}/.. \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(LIBNL_CFLAGS) \
$(LIBNDP_CFLAGS)
AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
@@ -31,6 +26,5 @@ noinst_PROGRAMS = \
rdisc_SOURCES = \
rdisc.c
rdisc_LDADD = \
- $(top_builddir)/src/libNetworkManager.la \
- $(LIBNDP_LIBS)
+ $(top_builddir)/src/libNetworkManager.la
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
index ae9306929e..bd4dba78dd 100644
--- a/src/settings/nm-agent-manager.c
+++ b/src/settings/nm-agent-manager.c
@@ -36,6 +36,9 @@
#include "nm-setting-vpn.h"
#include "nm-setting-connection.h"
#include "nm-enum-types.h"
+#include "nm-auth-subject.h"
+#include "nm-dbus-manager.h"
+#include "nm-session-monitor.h"
G_DEFINE_TYPE (NMAgentManager, nm_agent_manager, G_TYPE_OBJECT)
diff --git a/src/settings/nm-agent-manager.h b/src/settings/nm-agent-manager.h
index 5fdd66ef6f..07b2563abe 100644
--- a/src/settings/nm-agent-manager.h
+++ b/src/settings/nm-agent-manager.h
@@ -26,6 +26,7 @@
#include <nm-connection.h>
#include "nm-settings-flags.h"
#include "nm-secret-agent.h"
+#include "nm-types.h"
#define NM_TYPE_AGENT_MANAGER (nm_agent_manager_get_type ())
#define NM_AGENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_AGENT_MANAGER, NMAgentManager))
@@ -45,9 +46,9 @@ typedef enum {
NM_AGENT_MANAGER_ERROR_USER_CANCELED /*< nick=UserCanceled >*/
} NMAgentManagerError;
-typedef struct {
+struct _NMAgentManager {
GObject parent;
-} NMAgentManager;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/settings/nm-secret-agent.c b/src/settings/nm-secret-agent.c
index bf0bba1297..6714fd193b 100644
--- a/src/settings/nm-secret-agent.c
+++ b/src/settings/nm-secret-agent.c
@@ -33,6 +33,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-glib-compat.h"
#include "nm-logging.h"
+#include "nm-auth-subject.h"
G_DEFINE_TYPE (NMSecretAgent, nm_secret_agent, G_TYPE_OBJECT)
diff --git a/src/settings/nm-secret-agent.h b/src/settings/nm-secret-agent.h
index 69699af1a5..f123d0ac19 100644
--- a/src/settings/nm-secret-agent.h
+++ b/src/settings/nm-secret-agent.h
@@ -27,9 +27,8 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <nm-connection.h>
-#include "nm-dbus-manager.h"
+#include "nm-types.h"
#include "nm-settings-flags.h"
-#include "nm-auth-subject.h"
/* NOTE: ensure these capabilities match those in introspection/nm-secret-agent.xml and
* libnm-glib/nm-secret-agent.h.
@@ -46,9 +45,9 @@ typedef enum {
#define NM_IS_SECRET_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SECRET_AGENT))
#define NM_SECRET_AGENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SECRET_AGENT, NMSecretAgentClass))
-typedef struct {
+struct _NMSecretAgent {
GObject parent;
-} NMSecretAgent;
+};
typedef struct {
GObjectClass parent;
diff --git a/src/settings/nm-settings-connection.c b/src/settings/nm-settings-connection.c
index 4b319439b0..5bf8c31b34 100644
--- a/src/settings/nm-settings-connection.c
+++ b/src/settings/nm-settings-connection.c
@@ -38,6 +38,7 @@
#include "nm-dbus-glib-types.h"
#include "nm-logging.h"
#include "nm-manager-auth.h"
+#include "nm-auth-subject.h"
#include "nm-agent-manager.h"
#include "NetworkManagerUtils.h"
#include "nm-properties-changed-signal.h"
diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h
index 0c2ca849b4..8fd69640ad 100644
--- a/src/settings/nm-settings-connection.h
+++ b/src/settings/nm-settings-connection.h
@@ -22,10 +22,11 @@
#ifndef NM_SETTINGS_CONNECTION_H
#define NM_SETTINGS_CONNECTION_H
+#include <net/ethernet.h>
+
#include <nm-connection.h>
#include "nm-settings-flags.h"
-#include "nm-auth-subject.h"
-#include <net/ethernet.h>
+#include "nm-types.h"
G_BEGIN_DECLS
@@ -49,7 +50,6 @@ G_BEGIN_DECLS
#define NM_SETTINGS_CONNECTION_VISIBLE "visible"
#define NM_SETTINGS_CONNECTION_UNSAVED "unsaved"
-typedef struct _NMSettingsConnection NMSettingsConnection;
typedef struct _NMSettingsConnectionClass NMSettingsConnectionClass;
typedef void (*NMSettingsConnectionCommitFunc) (NMSettingsConnection *connection,
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c
index 775df6d90c..3a833db0c9 100644
--- a/src/settings/nm-settings.c
+++ b/src/settings/nm-settings.c
@@ -58,9 +58,11 @@
#include "nm-settings.h"
#include "nm-settings-connection.h"
#include "nm-settings-error.h"
+#include "nm-system-config-interface.h"
#include "nm-logging.h"
#include "nm-dbus-manager.h"
#include "nm-manager-auth.h"
+#include "nm-auth-subject.h"
#include "nm-session-monitor.h"
#include "plugins/keyfile/plugin.h"
#include "nm-agent-manager.h"
@@ -1578,7 +1580,7 @@ default_wired_clear_tag (NMSettings *self,
g_signal_handlers_disconnect_by_func (connection, G_CALLBACK (default_wired_connection_updated_by_user_cb), self);
if (add_to_no_auto_default)
- nm_config_set_ethernet_no_auto_default (NM_SETTINGS_GET_PRIVATE (self)->config, NM_CONFIG_DEVICE (device));
+ nm_config_set_ethernet_no_auto_default (NM_SETTINGS_GET_PRIVATE (self)->config, device);
}
void
@@ -1603,7 +1605,7 @@ nm_settings_device_added (NMSettings *self, NMDevice *device)
if ( !nm_device_get_managed (device)
|| g_object_get_data (G_OBJECT (device), DEFAULT_WIRED_CONNECTION_TAG)
|| have_connection_for_device (self, device)
- || !nm_config_get_ethernet_can_auto_default (priv->config, NM_CONFIG_DEVICE (device)))
+ || !nm_config_get_ethernet_can_auto_default (priv->config, device))
return;
hw_address = nm_device_get_hw_address (device, &len);
diff --git a/src/settings/nm-settings.h b/src/settings/nm-settings.h
index 67b7d0f690..520c4ec34c 100644
--- a/src/settings/nm-settings.h
+++ b/src/settings/nm-settings.h
@@ -28,10 +28,7 @@
#include <nm-connection.h>
-#include "nm-settings-connection.h"
-#include "nm-system-config-interface.h"
-#include "nm-device.h"
-#include "nm-secret-agent.h"
+#include "nm-types.h"
#define NM_TYPE_SETTINGS (nm_settings_get_type ())
#define NM_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTINGS, NMSettings))
@@ -52,9 +49,9 @@
#define NM_SETTINGS_SIGNAL_CONNECTION_VISIBILITY_CHANGED "connection-visibility-changed"
#define NM_SETTINGS_SIGNAL_AGENT_REGISTERED "agent-registered"
-typedef struct {
+struct _NMSettings {
GObject parent_instance;
-} NMSettings;
+};
typedef struct {
GObjectClass parent_class;
diff --git a/src/settings/nm-system-config-interface.c b/src/settings/nm-system-config-interface.c
index fdc3fdae2c..4ab16e24b8 100644
--- a/src/settings/nm-system-config-interface.c
+++ b/src/settings/nm-system-config-interface.c
@@ -20,6 +20,7 @@
*/
#include "nm-system-config-interface.h"
+#include "nm-settings-connection.h"
static void
interface_init (gpointer g_iface)
diff --git a/src/settings/nm-system-config-interface.h b/src/settings/nm-system-config-interface.h
index c04fae2de7..d1c83ec334 100644
--- a/src/settings/nm-system-config-interface.h
+++ b/src/settings/nm-system-config-interface.h
@@ -25,7 +25,7 @@
#include <glib.h>
#include <glib-object.h>
#include <nm-connection.h>
-#include <nm-settings-connection.h>
+#include "nm-types.h"
G_BEGIN_DECLS
diff --git a/src/settings/plugins/example/Makefile.am b/src/settings/plugins/example/Makefile.am
index c91977eb70..f862e4d92a 100644
--- a/src/settings/plugins/example/Makefile.am
+++ b/src/settings/plugins/example/Makefile.am
@@ -10,7 +10,6 @@ AM_CPPFLAGS = \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
-DNMCONFDIR=\"$(nmconfdir)\"
# 'noinst' here because this is an example plugin we don't want to install
diff --git a/src/settings/plugins/ifcfg-rh/Makefile.am b/src/settings/plugins/ifcfg-rh/Makefile.am
index b3cdbb63ea..c989617c1c 100644
--- a/src/settings/plugins/ifcfg-rh/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/Makefile.am
@@ -32,13 +32,11 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/posix-signals \
-I$(top_srcdir)/src/config \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
$(NSS_CFLAGS) \
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-rh"\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
@@ -53,7 +51,6 @@ libnm_settings_plugin_ifcfg_rh_la_SOURCES = \
libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version
libnm_settings_plugin_ifcfg_rh_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/libnm-glib/libnm-glib.la \
libifcfg-rh-io.la \
$(GLIB_LIBS)
diff --git a/src/settings/plugins/ifcfg-rh/tests/Makefile.am b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
index cd4dd76bc9..368588cd5b 100644
--- a/src/settings/plugins/ifcfg-rh/tests/Makefile.am
+++ b/src/settings/plugins/ifcfg-rh/tests/Makefile.am
@@ -6,12 +6,10 @@ SUBDIRS=network-scripts
AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/src/ \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src/platform \
@@ -31,8 +29,7 @@ AM_LDFLAGS = \
$(CODE_COVERAGE_LDFLAGS)
AM_LDADD = \
- $(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/libnm-glib/libnm-glib.la
+ $(top_builddir)/libnm-util/libnm-util.la
noinst_PROGRAMS = test-ifcfg-rh test-ifcfg-rh-utils
diff --git a/src/settings/plugins/ifcfg-suse/Makefile.am b/src/settings/plugins/ifcfg-suse/Makefile.am
index a9eef37239..e528370995 100644
--- a/src/settings/plugins/ifcfg-suse/Makefile.am
+++ b/src/settings/plugins/ifcfg-suse/Makefile.am
@@ -1,13 +1,10 @@
AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
-I${top_srcdir}/src \
-I${top_srcdir}/src/settings \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
- -I$(top_srcdir)/libnm-glib \
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-suse"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
-DSYSCONFDIR=\"$(sysconfdir)\"
@@ -21,6 +18,5 @@ libnm_settings_plugin_ifcfg_suse_la_SOURCES = \
libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version
libnm_settings_plugin_ifcfg_suse_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/libnm-glib/libnm-glib.la \
$(GLIB_LIBS)
diff --git a/src/settings/plugins/ifnet/Makefile.am b/src/settings/plugins/ifnet/Makefile.am
index 1b317f6fdd..3111dbff31 100644
--- a/src/settings/plugins/ifnet/Makefile.am
+++ b/src/settings/plugins/ifnet/Makefile.am
@@ -9,15 +9,11 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/platform \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
- $(GUDEV_CFLAGS) \
-DSYSCONFDIR=\"$(sysconfdir)\"
-DSBINDIR=\"$(sbindir)\"
@@ -35,7 +31,6 @@ libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version
libnm_settings_plugin_ifnet_la_LIBADD = \
$(top_builddir)/libnm-util/libnm-util.la \
- $(top_builddir)/libnm-glib/libnm-glib.la \
lib-ifnet-io.la\
$(GLIB_LIBS) \
$(GUDEV_LIBS)
diff --git a/src/settings/plugins/ifnet/tests/Makefile.am b/src/settings/plugins/ifnet/tests/Makefile.am
index 93f72214bc..1a4aca7d96 100644
--- a/src/settings/plugins/ifnet/tests/Makefile.am
+++ b/src/settings/plugins/ifnet/tests/Makefile.am
@@ -4,7 +4,6 @@ if ENABLE_TESTS
AM_CPPFLAGS= \
-I$(srcdir)/../ \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/include \
@@ -17,8 +16,6 @@ AM_CPPFLAGS= \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(CHECK_CFLAGS) \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-DTEST_WPA_SUPPLICANT_CONF='"$(srcdir)/wpa_supplicant.conf"' \
-DSYSCONFDIR=\"nonexistent\"
diff --git a/src/settings/plugins/ifupdown/Makefile.am b/src/settings/plugins/ifupdown/Makefile.am
index ec4196e702..0154d38bb5 100644
--- a/src/settings/plugins/ifupdown/Makefile.am
+++ b/src/settings/plugins/ifupdown/Makefile.am
@@ -8,14 +8,11 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/config \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
$(GUDEV_CFLAGS) \
-DSYSCONFDIR=\"$(sysconfdir)\"
diff --git a/src/settings/plugins/ifupdown/tests/Makefile.am b/src/settings/plugins/ifupdown/tests/Makefile.am
index 2967413fce..994079b7b3 100644
--- a/src/settings/plugins/ifupdown/tests/Makefile.am
+++ b/src/settings/plugins/ifupdown/tests/Makefile.am
@@ -4,7 +4,6 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src/settings \
@@ -12,8 +11,6 @@ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
-DTEST_ENI_DIR=\"$(abs_srcdir)\"
noinst_PROGRAMS = test-ifupdown
@@ -25,7 +22,6 @@ test_ifupdown_SOURCES = \
test_ifupdown_LDADD = \
$(top_builddir)/src/libNetworkManager.la \
- $(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(DBUS_LIBS)
diff --git a/src/settings/plugins/keyfile/Makefile.am b/src/settings/plugins/keyfile/Makefile.am
index 21e0cde9fc..2066026256 100644
--- a/src/settings/plugins/keyfile/Makefile.am
+++ b/src/settings/plugins/keyfile/Makefile.am
@@ -14,7 +14,6 @@ AM_CPPFLAGS = \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
-DNMCONFDIR=\"$(nmconfdir)\"
noinst_LTLIBRARIES = \
diff --git a/src/settings/plugins/keyfile/tests/Makefile.am b/src/settings/plugins/keyfile/tests/Makefile.am
index 7b148ca539..114d17ac02 100644
--- a/src/settings/plugins/keyfile/tests/Makefile.am
+++ b/src/settings/plugins/keyfile/tests/Makefile.am
@@ -8,14 +8,12 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
- -I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src/settings \
-I$(srcdir)/../ \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
- $(POLKIT_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
@@ -34,7 +32,6 @@ test_keyfile_SOURCES = \
test_keyfile_LDADD = \
$(top_builddir)/src/libNetworkManager.la \
- $(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(DBUS_LIBS) \
$(CODE_COVERAGE_LDFLAGS)
diff --git a/src/settings/tests/Makefile.am b/src/settings/tests/Makefile.am
index 5432724b48..7e2f4e4737 100644
--- a/src/settings/tests/Makefile.am
+++ b/src/settings/tests/Makefile.am
@@ -4,8 +4,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src/settings \
-DG_LOG_DOMAIN=\""NetworkManager"\" \
- $(GLIB_CFLAGS) \
- $(DBUS_CFLAGS)
+ $(GLIB_CFLAGS)
noinst_PROGRAMS = \
test-wired-defname
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index e4e6b3c369..ab7ae72b1e 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -4,7 +4,6 @@ AM_CPPFLAGS = \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src/platform \
- -I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src/dhcp-manager \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
diff --git a/src/tests/test-ip4-config.c b/src/tests/test-ip4-config.c
index 3eee5f1366..0032b8f7a7 100644
--- a/src/tests/test-ip4-config.c
+++ b/src/tests/test-ip4-config.c
@@ -23,6 +23,7 @@
#include <arpa/inet.h>
#include "nm-ip4-config.h"
+#include "nm-platform.h"
static void
addr_init (NMPlatformIP4Address *a, const char *addr, const char *peer, guint plen)
diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c
index 75fe28eef6..2177241de5 100644
--- a/src/tests/test-ip6-config.c
+++ b/src/tests/test-ip6-config.c
@@ -25,6 +25,7 @@
#include "nm-ip6-config.h"
#include "nm-logging.h"
+#include "nm-platform.h"
#include "nm-test-utils.h"
static NMIP6Config *
diff --git a/src/tests/test-resolvconf-capture.c b/src/tests/test-resolvconf-capture.c
index cde4bbe5be..2d787b7188 100644
--- a/src/tests/test-resolvconf-capture.c
+++ b/src/tests/test-resolvconf-capture.c
@@ -22,6 +22,8 @@
#include <string.h>
#include "NetworkManagerUtils.h"
+#include "nm-ip4-config.h"
+#include "nm-ip6-config.h"
#include "nm-platform.h"
static void
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
index e42d676f84..445cebd2c2 100644
--- a/src/vpn-manager/nm-vpn-connection.c
+++ b/src/vpn-manager/nm-vpn-connection.c
@@ -33,6 +33,9 @@
#include "nm-setting-connection.h"
#include "nm-setting-vpn.h"
#include "nm-setting-ip4-config.h"
+#include "nm-ip4-config.h"
+#include "nm-setting-ip6-config.h"
+#include "nm-ip6-config.h"
#include "nm-dbus-manager.h"
#include "nm-platform.h"
#include "nm-logging.h"
diff --git a/src/vpn-manager/nm-vpn-connection.h b/src/vpn-manager/nm-vpn-connection.h
index c9c88cda14..3b3ec1fb1e 100644
--- a/src/vpn-manager/nm-vpn-connection.h
+++ b/src/vpn-manager/nm-vpn-connection.h
@@ -27,6 +27,7 @@
#include "NetworkManagerVPN.h"
#include "nm-device.h"
#include "nm-auth-subject.h"
+#include "nm-active-connection.h"
#define NM_TYPE_VPN_CONNECTION (nm_vpn_connection_get_type ())
#define NM_VPN_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_VPN_CONNECTION, NMVPNConnection))