summaryrefslogtreecommitdiff
path: root/src/network/networkd-network.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-28 22:52:04 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-29 19:01:28 -0400
commit634f0f983c57e41292dd36c7327e99316ff61aa3 (patch)
tree3001bda48db13713279ac42ca1650fc49cdaecda /src/network/networkd-network.h
parent26ccc1d0875b0e0c4306b03a52aff712c23d46c7 (diff)
networkd: rework headers to avoid circular includes
Header files were organized in a way where the includer would add various typedefs used by the includee before including it, resulting in a tangled web of dependencies between files. Replace this with the following logic: networkd.h / \ networkd-link.h \ networkd-ipv4ll.h--\__\ networkd-fdb.h \ networkd-network.h netword-netdev-*.h networkd-route.h \ networkd-netdev.h If a pointer to a structure defined in a different header file is needed, use a typedef line instead of including the whole header.
Diffstat (limited to 'src/network/networkd-network.h')
-rw-r--r--src/network/networkd-network.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 15417f4828..9b8096f9ae 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -19,18 +19,19 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "sd-bus.h"
+#include "udev.h"
+
#include "condition.h"
+#include "dhcp-identifier.h"
+#include "hashmap.h"
#include "resolve-util.h"
-typedef struct Network Network;
-
-#include "dhcp-identifier.h"
#include "networkd-address.h"
#include "networkd-fdb.h"
#include "networkd-netdev.h"
#include "networkd-route.h"
#include "networkd-util.h"
-#include "networkd.h"
#define DHCP_ROUTE_METRIC 1024
#define IPV4LL_ROUTE_METRIC 2048
@@ -67,6 +68,8 @@ typedef enum LLDPMode {
_LLDP_MODE_INVALID = -1,
} LLDPMode;
+typedef struct Manager Manager;
+
struct Network {
Manager *manager;