summaryrefslogtreecommitdiff
path: root/src/network/networkd.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.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.h')
-rw-r--r--src/network/networkd.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 72a2438ac8..39826a440d 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -24,19 +24,30 @@
#include "sd-bus.h"
#include "sd-event.h"
#include "sd-netlink.h"
+#include "udev.h"
+#include "dhcp-identifier.h"
#include "hashmap.h"
#include "list.h"
-#include "udev.h"
-typedef struct Manager Manager;
-
-#include "dhcp-identifier.h"
#include "networkd-address-pool.h"
#include "networkd-link.h"
+#include "networkd-netdev-bond.h"
+#include "networkd-netdev-bridge.h"
+#include "networkd-netdev-dummy.h"
+#include "networkd-netdev-ipvlan.h"
+#include "networkd-netdev-macvlan.h"
+#include "networkd-netdev-tunnel.h"
+#include "networkd-netdev-tuntap.h"
+#include "networkd-netdev-veth.h"
+#include "networkd-netdev-vlan.h"
+#include "networkd-netdev-vlan.h"
+#include "networkd-netdev-vxlan.h"
#include "networkd-network.h"
#include "networkd-util.h"
+extern const char* const network_dirs[];
+
struct Manager {
sd_netlink *rtnl;
sd_event *event;
@@ -71,10 +82,6 @@ struct Manager {
uint8_t dhcp_duid[MAX_DUID_LEN];
};
-extern const char* const network_dirs[];
-
-/* Manager */
-
extern const sd_bus_vtable manager_vtable[];
int manager_new(Manager **ret);