Commit adb56d13 authored by Thomas Haller's avatar Thomas Haller

core: split "nm-core-utils.h" out of "NetworkManagerUtils.h"

"NetworkManagerUtils.h" contains a bunch of helper tools for core
daemon ("src/").

Unfortunately, it has dependencies to other parts of core,
such as "nm-device.h" and "nm-platform.h". Split out a part
of tools that are independent so that they can be used without
dragging in other dependencies.

"nm-core-utils.h" should only use libnm-core, "nm-logging.h"
and shared.

"NetworkManagerUtils.h" should provide all "nm-core-utils.h" and
possibly other utilities that have larger dependencies.
parent e4a7502a
......@@ -404,6 +404,8 @@ libNetworkManager_la_SOURCES = \
nm-session-monitor.c \
nm-sleep-monitor.h \
nm-types.h \
nm-core-utils.c \
nm-core-utils.h \
NetworkManagerUtils.c \
NetworkManagerUtils.h
......@@ -535,6 +537,8 @@ libnm_iface_helper_la_SOURCES = \
nm-logging.h \
nm-multi-index.c \
nm-multi-index.h \
nm-core-utils.c \
nm-core-utils.h \
NetworkManagerUtils.c \
NetworkManagerUtils.h
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -38,7 +38,7 @@
#endif
#include "nm-errors.h"
#include "NetworkManagerUtils.h"
#include "nm-core-utils.h"
typedef enum {
LOG_FORMAT_FLAG_NONE = 0,
......
......@@ -20,6 +20,8 @@
#include "nm-default.h"
#include "nm-fake-platform.h"
#include <errno.h>
#include <unistd.h>
#include <netinet/icmp6.h>
......@@ -27,9 +29,9 @@
#include <linux/rtnetlink.h>
#include "nm-utils.h"
#include "nm-core-utils.h"
#include "nmp-object.h"
#include "NetworkManagerUtils.h"
#include "nm-fake-platform.h"
#include "nm-test-utils.h"
......
......@@ -19,6 +19,8 @@
*/
#include "nm-default.h"
#include "nm-linux-platform.h"
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
......@@ -42,18 +44,15 @@
#include <netlink/route/route.h>
#include <gudev/gudev.h>
#include "nm-utils.h"
#include "nm-core-internal.h"
#include "NetworkManagerUtils.h"
#include "nm-linux-platform.h"
#include "nm-setting-vlan.h"
#include "nm-core-utils.h"
#include "nmp-object.h"
#include "nm-platform-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "wifi/wifi-utils.h"
#include "wifi/wifi-utils-wext.h"
#include "nmp-object.h"
/* This is only included for the translation of VLAN flags */
#include "nm-setting-vlan.h"
#define VLAN_FLAG_MVRP 0x8
......
......@@ -18,6 +18,8 @@
* Copyright (C) 2015 Red Hat, Inc.
*/
#include "nm-default.h"
#include "nm-platform-utils.h"
#include <string.h>
......@@ -30,10 +32,9 @@
#include <linux/version.h>
#include "nm-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-default.h"
#include "nm-setting-wired.h"
#include "nm-core-utils.h"
/******************************************************************
* ethtool
......
......@@ -20,6 +20,8 @@
#include "nm-default.h"
#include "nm-platform.h"
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
......@@ -32,14 +34,13 @@
#include <linux/if_tun.h>
#include <linux/if_tunnel.h>
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-platform.h"
#include "nm-core-internal.h"
#include "nm-core-utils.h"
#include "nm-enum-types.h"
#include "nm-platform-utils.h"
#include "nmp-object.h"
#include "NetworkManagerUtils.h"
#include "nm-enum-types.h"
#include "nm-core-internal.h"
/*****************************************************************************/
......
......@@ -27,11 +27,11 @@
#include <linux/if_link.h>
#include "nm-dbus-interface.h"
#include "nm-default.h"
#include "NetworkManagerUtils.h"
#include "nm-setting-vlan.h"
#include "nm-core-types-internal.h"
#include "nm-core-utils.h"
#include "nm-setting-vlan.h"
#define NM_TYPE_PLATFORM (nm_platform_get_type ())
#define NM_PLATFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_PLATFORM, NMPlatform))
#define NM_PLATFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_PLATFORM, NMPlatformClass))
......
......@@ -20,13 +20,15 @@
#include "nm-default.h"
#include "nmp-object.h"
#include <unistd.h>
#include "nmp-object.h"
#include "nm-platform-utils.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-core-utils.h"
#include "nm-platform-utils.h"
/*********************************************************************************************/
#define _NMLOG_DOMAIN LOGD_PLATFORM
......
......@@ -22,8 +22,8 @@
#include <linux/rtnetlink.h>
#include "nm-core-utils.h"
#include "test-common.h"
#include "NetworkManagerUtils.h"
#include "nm-test-utils.h"
......
......@@ -24,7 +24,7 @@
#include <errno.h>
#include <arpa/inet.h>
#include "NetworkManagerUtils.c"
#include "nm-core-utils.c"
#include "nm-test-utils.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment