summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am14
-rw-r--r--src/network/netdev/bridge.c2
-rw-r--r--src/network/netdev/netdev.c15
-rw-r--r--src/network/networkd-address-pool.c2
-rw-r--r--src/network/networkd-address.c2
-rw-r--r--src/network/networkd-brvlan.c4
-rw-r--r--src/network/networkd-conf.c2
-rw-r--r--src/network/networkd-conf.h2
-rw-r--r--src/network/networkd-dhcp4.c4
-rw-r--r--src/network/networkd-dhcp6.c4
-rw-r--r--src/network/networkd-fdb.c3
-rw-r--r--src/network/networkd-gperf.gperf1
-rw-r--r--src/network/networkd-ipv4ll.c5
-rw-r--r--src/network/networkd-link-bus.c2
-rw-r--r--src/network/networkd-link.c2
-rw-r--r--src/network/networkd-lldp-tx.c2
-rw-r--r--src/network/networkd-manager-bus.c2
-rw-r--r--src/network/networkd-manager.c2
-rw-r--r--src/network/networkd-manager.h (renamed from src/network/networkd.h)13
-rw-r--r--src/network/networkd-ndisc.c3
-rw-r--r--src/network/networkd-network-bus.c2
-rw-r--r--src/network/networkd-network-gperf.gperf2
-rw-r--r--src/network/networkd-network.c2
-rw-r--r--src/network/networkd-route.c2
-rw-r--r--src/network/networkd.c2
-rw-r--r--src/network/test-network-tables.c4
-rw-r--r--src/network/test-network.c2
27 files changed, 57 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am
index b71e204281..6173e7a40f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5610,11 +5610,6 @@ libnetworkd_core_la_CFLAGS = \
libnetworkd_core_la_SOURCES = \
src/libsystemd-network/network-internal.h \
- src/network/networkd.h \
- src/network/networkd-conf.h \
- src/network/networkd-conf.c \
- src/network/networkd-link.h \
- src/network/networkd-link.c \
src/network/netdev/netdev.h \
src/network/netdev/netdev.c \
src/network/netdev/vrf.h \
@@ -5641,6 +5636,13 @@ libnetworkd_core_la_SOURCES = \
src/network/netdev/bridge.c \
src/network/netdev/vcan.h \
src/network/netdev/vcan.c \
+ src/network/networkd-manager.h \
+ src/network/networkd-manager.c \
+ src/network/networkd-manager-bus.c \
+ src/network/networkd-conf.h \
+ src/network/networkd-conf.c \
+ src/network/networkd-link.h \
+ src/network/networkd-link.c \
src/network/networkd-link-bus.c \
src/network/networkd-ipv4ll.c \
src/network/networkd-dhcp4.c \
@@ -5654,8 +5656,6 @@ libnetworkd_core_la_SOURCES = \
src/network/networkd-address.c \
src/network/networkd-route.h \
src/network/networkd-route.c \
- src/network/networkd-manager.c \
- src/network/networkd-manager-bus.c \
src/network/networkd-fdb.h \
src/network/networkd-fdb.c \
src/network/networkd-brvlan.h \
diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c
index 760aefd97e..08e31b974f 100644
--- a/src/network/netdev/bridge.c
+++ b/src/network/netdev/bridge.c
@@ -22,8 +22,8 @@
#include "missing.h"
#include "netlink-util.h"
-#include "networkd.h"
#include "netdev/bridge.h"
+#include "networkd-manager.h"
/* callback for brige netdev's parameter set */
static int netdev_bridge_set_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) {
diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c
index 4f287bab72..9b9e83d9db 100644
--- a/src/network/netdev/netdev.c
+++ b/src/network/netdev/netdev.c
@@ -27,12 +27,25 @@
#include "netlink-util.h"
#include "network-internal.h"
#include "netdev/netdev.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "siphash24.h"
#include "stat-util.h"
#include "string-table.h"
#include "string-util.h"
+#include "netdev/bridge.h"
+#include "netdev/bond.h"
+#include "netdev/vlan.h"
+#include "netdev/macvlan.h"
+#include "netdev/ipvlan.h"
+#include "netdev/vxlan.h"
+#include "netdev/tunnel.h"
+#include "netdev/tuntap.h"
+#include "netdev/veth.h"
+#include "netdev/dummy.h"
+#include "netdev/vrf.h"
+#include "netdev/vcan.h"
+
const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
[NETDEV_KIND_BRIDGE] = &bridge_vtable,
[NETDEV_KIND_BOND] = &bond_vtable,
diff --git a/src/network/networkd-address-pool.c b/src/network/networkd-address-pool.c
index ebc6c9eb9e..a63b925a4a 100644
--- a/src/network/networkd-address-pool.c
+++ b/src/network/networkd-address-pool.c
@@ -19,7 +19,7 @@
#include "alloc-util.h"
#include "networkd-address-pool.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "set.h"
#include "string-util.h"
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index ed52d5e42d..2b698d9531 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -24,7 +24,7 @@
#include "firewall-util.h"
#include "netlink-util.h"
#include "networkd-address.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "parse-util.h"
#include "set.h"
#include "socket-util.h"
diff --git a/src/network/networkd-brvlan.c b/src/network/networkd-brvlan.c
index 18ecd86858..fa5d3ee7fa 100644
--- a/src/network/networkd-brvlan.c
+++ b/src/network/networkd-brvlan.c
@@ -25,7 +25,9 @@
#include "conf-parser.h"
#include "netlink-util.h"
#include "networkd-brvlan.h"
-#include "networkd.h"
+#include "networkd-link.h"
+#include "networkd-manager.h"
+#include "networkd-network.h"
#include "parse-util.h"
#include "vlan-util.h"
diff --git a/src/network/networkd-conf.c b/src/network/networkd-conf.c
index 49bb8c18f6..aaa27f311d 100644
--- a/src/network/networkd-conf.c
+++ b/src/network/networkd-conf.c
@@ -22,8 +22,10 @@
#include "conf-parser.h"
#include "def.h"
#include "dhcp-identifier.h"
+#include "extract-word.h"
#include "hexdecoct.h"
#include "networkd-conf.h"
+#include "networkd-network.h"
#include "string-table.h"
int manager_parse_config_file(Manager *m) {
diff --git a/src/network/networkd-conf.h b/src/network/networkd-conf.h
index c7bfb42a72..93819626ba 100644
--- a/src/network/networkd-conf.h
+++ b/src/network/networkd-conf.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "networkd.h"
+typedef struct Manager Manager;
int manager_parse_config_file(Manager *m);
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 3feb158642..614bceefab 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -24,7 +24,9 @@
#include "dhcp-lease-internal.h"
#include "hostname-util.h"
#include "network-internal.h"
-#include "networkd.h"
+#include "networkd-link.h"
+#include "networkd-manager.h"
+#include "networkd-network.h"
static int dhcp4_route_handler(sd_netlink *rtnl, sd_netlink_message *m,
void *userdata) {
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 15acf56a5f..6ba2d170e7 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -23,7 +23,8 @@
#include "sd-dhcp6-client.h"
#include "network-internal.h"
-#include "networkd.h"
+#include "networkd-link.h"
+#include "networkd-manager.h"
static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link);
@@ -125,7 +126,6 @@ static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) {
assert(link);
assert(link->network);
- assert(link->manager);
if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
return;
diff --git a/src/network/networkd-fdb.c b/src/network/networkd-fdb.c
index ed5a47589e..3d7f4d2b2d 100644
--- a/src/network/networkd-fdb.c
+++ b/src/network/networkd-fdb.c
@@ -22,9 +22,10 @@
#include "alloc-util.h"
#include "conf-parser.h"
+#include "netdev/bridge.h"
#include "netlink-util.h"
#include "networkd-fdb.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "util.h"
#include "vlan-util.h"
diff --git a/src/network/networkd-gperf.gperf b/src/network/networkd-gperf.gperf
index 3fdfe74955..eca436d9fd 100644
--- a/src/network/networkd-gperf.gperf
+++ b/src/network/networkd-gperf.gperf
@@ -2,6 +2,7 @@
#include <stddef.h>
#include "conf-parser.h"
#include "networkd-conf.h"
+#include "networkd-manager.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 2d81311e81..7ba05dbec3 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -21,7 +21,9 @@
#include <linux/if.h>
#include "network-internal.h"
-#include "networkd.h"
+#include "networkd-address.h"
+#include "networkd-manager.h"
+#include "networkd-link.h"
static int ipv4ll_address_lost(Link *link) {
_cleanup_address_free_ Address *address = NULL;
@@ -171,7 +173,6 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
assert(link);
assert(link->network);
- assert(link->manager);
if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
return;
diff --git a/src/network/networkd-link-bus.c b/src/network/networkd-link-bus.c
index 532557ed6c..c39c648334 100644
--- a/src/network/networkd-link-bus.c
+++ b/src/network/networkd-link-bus.c
@@ -20,7 +20,7 @@
#include "alloc-util.h"
#include "bus-util.h"
#include "networkd-link.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "parse-util.h"
#include "strv.h"
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index bae75aca6f..0b634572a9 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -29,8 +29,8 @@
#include "netlink-util.h"
#include "network-internal.h"
#include "networkd-lldp-tx.h"
+#include "networkd-manager.h"
#include "networkd-ndisc.h"
-#include "networkd.h"
#include "set.h"
#include "socket-util.h"
#include "stdio-util.h"
diff --git a/src/network/networkd-lldp-tx.c b/src/network/networkd-lldp-tx.c
index 3aa768388b..2de63ce746 100644
--- a/src/network/networkd-lldp-tx.c
+++ b/src/network/networkd-lldp-tx.c
@@ -26,7 +26,7 @@
#include "fileio.h"
#include "hostname-util.h"
#include "networkd-lldp-tx.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "parse-util.h"
#include "random-util.h"
#include "socket-util.h"
diff --git a/src/network/networkd-manager-bus.c b/src/network/networkd-manager-bus.c
index 0c429b9471..cbb1b93031 100644
--- a/src/network/networkd-manager-bus.c
+++ b/src/network/networkd-manager-bus.c
@@ -19,7 +19,7 @@
#include "alloc-util.h"
#include "bus-util.h"
-#include "networkd.h"
+#include "networkd-manager.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState);
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 9174dcc7f4..a1252c9b51 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -33,7 +33,7 @@
#include "libudev-private.h"
#include "local-addresses.h"
#include "netlink-util.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "ordered-set.h"
#include "path-util.h"
#include "set.h"
diff --git a/src/network/networkd.h b/src/network/networkd-manager.h
index 17063427da..a90d9a933f 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd-manager.h
@@ -32,20 +32,7 @@
#include "networkd-address-pool.h"
#include "networkd-link.h"
-#include "netdev/bond.h"
-#include "netdev/bridge.h"
-#include "netdev/dummy.h"
-#include "netdev/ipvlan.h"
-#include "netdev/macvlan.h"
-#include "netdev/tunnel.h"
-#include "netdev/tuntap.h"
-#include "netdev/veth.h"
-#include "netdev/vlan.h"
-#include "netdev/vrf.h"
-#include "netdev/vxlan.h"
-#include "netdev/vcan.h"
#include "networkd-network.h"
-#include "networkd-util.h"
extern const char* const network_dirs[];
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 4853791aa5..70283e5347 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -18,11 +18,12 @@
***/
#include <netinet/icmp6.h>
+#include <arpa/inet.h>
#include "sd-ndisc.h"
-#include "networkd.h"
#include "networkd-ndisc.h"
+#include "networkd-route.h"
#define NDISC_DNSSL_MAX 64U
#define NDISC_RDNSS_MAX 64U
diff --git a/src/network/networkd-network-bus.c b/src/network/networkd-network-bus.c
index 6e21676d23..3b835b52f9 100644
--- a/src/network/networkd-network-bus.c
+++ b/src/network/networkd-network-bus.c
@@ -18,7 +18,7 @@
***/
#include "alloc-util.h"
-#include "networkd.h"
+#include "networkd-manager.h"
#include "string-util.h"
#include "strv.h"
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 814f435fc1..efd3176ac3 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -1,8 +1,8 @@
%{
#include <stddef.h>
#include "conf-parser.h"
-#include "networkd.h"
#include "networkd-conf.h"
+#include "networkd-network.h"
#include "network-internal.h"
#include "vlan-util.h"
%}
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 670d583e37..31e899eecd 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -27,8 +27,8 @@
#include "fd-util.h"
#include "hostname-util.h"
#include "network-internal.h"
+#include "networkd-manager.h"
#include "networkd-network.h"
-#include "networkd.h"
#include "parse-util.h"
#include "set.h"
#include "stat-util.h"
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 6f60ee5e31..f78e106991 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -21,8 +21,8 @@
#include "conf-parser.h"
#include "in-addr-util.h"
#include "netlink-util.h"
+#include "networkd-manager.h"
#include "networkd-route.h"
-#include "networkd.h"
#include "parse-util.h"
#include "set.h"
#include "string-util.h"
diff --git a/src/network/networkd.c b/src/network/networkd.c
index c8f81a2ca6..2851432eff 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -20,8 +20,8 @@
#include "sd-daemon.h"
#include "capability-util.h"
-#include "networkd.h"
#include "networkd-conf.h"
+#include "networkd-manager.h"
#include "signal-util.h"
#include "user-util.h"
diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c
index 77247c5771..eee91d11d2 100644
--- a/src/network/test-network-tables.c
+++ b/src/network/test-network-tables.c
@@ -3,8 +3,10 @@
#include "ethtool-util.h"
#include "netlink-internal.h"
#include "netdev/bond.h"
+#include "netdev/ipvlan.h"
#include "netdev/macvlan.h"
-#include "networkd.h"
+#include "networkd-link.h"
+#include "networkd-util.h"
#include "test-tables.h"
int main(int argc, char **argv) {
diff --git a/src/network/test-network.c b/src/network/test-network.c
index 855646173f..93184a7f88 100644
--- a/src/network/test-network.c
+++ b/src/network/test-network.c
@@ -20,7 +20,7 @@
#include "alloc-util.h"
#include "dhcp-lease-internal.h"
#include "network-internal.h"
-#include "networkd.h"
+#include "networkd-manager.h"
static void test_deserialize_in_addr(void) {
_cleanup_free_ struct in_addr *addresses = NULL;