summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--[l---------]src/network/Makefile214
-rw-r--r--src/network/networkctl.c10
-rw-r--r--src/network/networkd-dhcp6.c2
-rw-r--r--src/network/networkd-link.h16
-rw-r--r--src/network/networkd-manager.c4
-rw-r--r--src/network/networkd-ndisc.c2
-rw-r--r--src/network/networkd-netdev-bond.c2
-rw-r--r--src/network/networkd-netdev-tunnel.c2
-rw-r--r--src/network/networkd-netdev-veth.c2
-rw-r--r--src/network/networkd-netdev-vxlan.c2
-rw-r--r--src/network/networkd-netdev.h2
-rw-r--r--src/network/networkd-network.h2
-rw-r--r--src/network/networkd-wait-online-link.c2
-rw-r--r--src/network/networkd-wait-online.c2
-rw-r--r--src/network/networkd-wait-online.h6
-rw-r--r--src/network/networkd.c2
-rw-r--r--src/network/networkd.h6
17 files changed, 245 insertions, 33 deletions
diff --git a/src/network/Makefile b/src/network/Makefile
index d0b0e8e008..d43dfdfca8 120000..100644
--- a/src/network/Makefile
+++ b/src/network/Makefile
@@ -1 +1,213 @@
-../Makefile \ No newline at end of file
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+ifneq ($(ENABLE_NETWORKD),)
+libexec_PROGRAMS += \
+ systemd-networkd
+
+systemd_networkd_SOURCES = \
+ src/network/networkd.c
+
+systemd_networkd_LDADD = \
+ libnetworkd-core.la
+
+ifneq ($(HAVE_LIBIPTC),)
+systemd_networkd_LDADD += \
+ libfirewall.la
+endif # HAVE_LIBIPTC
+
+noinst_LTLIBRARIES += \
+ libnetworkd-core.la
+
+libnetworkd_core_la_CFLAGS = \
+ $(AM_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/networkd-netdev.h \
+ src/network/networkd-netdev.c \
+ src/network/networkd-netdev-tunnel.h \
+ src/network/networkd-netdev-tunnel.c \
+ src/network/networkd-netdev-veth.h \
+ src/network/networkd-netdev-veth.c \
+ src/network/networkd-netdev-vxlan.h \
+ src/network/networkd-netdev-vxlan.c \
+ src/network/networkd-netdev-vlan.h \
+ src/network/networkd-netdev-vlan.c \
+ src/network/networkd-netdev-macvlan.h \
+ src/network/networkd-netdev-macvlan.c \
+ src/network/networkd-netdev-ipvlan.h \
+ src/network/networkd-netdev-ipvlan.c \
+ src/network/networkd-netdev-dummy.h \
+ src/network/networkd-netdev-dummy.c \
+ src/network/networkd-netdev-tuntap.h \
+ src/network/networkd-netdev-tuntap.c \
+ src/network/networkd-netdev-bond.h \
+ src/network/networkd-netdev-bond.c \
+ src/network/networkd-netdev-bridge.h \
+ src/network/networkd-netdev-bridge.c \
+ src/network/networkd-link-bus.c \
+ src/network/networkd-ipv4ll.c \
+ src/network/networkd-dhcp4.c \
+ src/network/networkd-dhcp6.c \
+ src/network/networkd-ndisc.c \
+ src/network/networkd-network.h \
+ src/network/networkd-network.c \
+ src/network/networkd-network-bus.c \
+ src/network/networkd-address.h \
+ 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-address-pool.h \
+ src/network/networkd-address-pool.c \
+ src/network/networkd-util.h \
+ src/network/networkd-util.c \
+ src/network/networkd-lldp-tx.h \
+ src/network/networkd-lldp-tx.c
+
+nodist_libnetworkd_core_la_SOURCES = \
+ src/network/networkd-gperf.c \
+ src/network/networkd-network-gperf.c \
+ src/network/networkd-netdev-gperf.c
+
+libnetworkd_core_la_LIBADD = \
+ libsystemd-network.la \
+ libshared.la
+
+libexec_PROGRAMS += \
+ systemd-networkd-wait-online
+
+systemd_networkd_wait_online_CFLAGS = \
+ $(AM_CFLAGS)
+
+systemd_networkd_wait_online_SOURCES = \
+ src/libsystemd-network/network-internal.h \
+ src/network/networkd-wait-online.h \
+ src/network/networkd-wait-online-link.h \
+ src/network/networkd-wait-online.c \
+ src/network/networkd-wait-online-manager.c \
+ src/network/networkd-wait-online-link.c
+
+systemd_networkd_wait_online_LDADD = \
+ libsystemd-network.la \
+ libshared.la
+
+bin_PROGRAMS += \
+ networkctl
+
+networkctl_SOURCES = \
+ src/network/networkctl.c
+
+networkctl_LDADD = \
+ libshared.la \
+ libsystemd-network.la
+
+dist_bashcompletion_data += \
+ shell-completion/bash/networkctl
+
+test_networkd_conf_SOURCES = \
+ src/network/test-networkd-conf.c
+
+test_networkd_conf_LDADD = \
+ libnetworkd-core.la
+
+test_network_SOURCES = \
+ src/network/test-network.c
+
+test_network_LDADD = \
+ libnetworkd-core.la
+
+ifneq ($(HAVE_LIBIPTC),)
+test_network_LDADD += \
+ libfirewall.la
+endif # HAVE_LIBIPTC
+
+test_network_tables_SOURCES = \
+ src/network/test-network-tables.c \
+ src/shared/test-tables.h
+
+test_network_tables_LDADD = \
+ libnetworkd-core.la \
+ libudev-core.la
+
+ifneq ($(HAVE_LIBIPTC),)
+test_network_tables_LDADD += \
+ libfirewall.la
+endif # HAVE_LIBIPTC
+
+tests += \
+ test-networkd-conf \
+ test-network \
+ test-network-tables
+
+dist_systemunit_DATA += \
+ units/systemd-networkd.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-networkd.service \
+ units/systemd-networkd-wait-online.service
+
+dist_systemunit_DATA_busnames += \
+ units/org.freedesktop.network1.busname
+
+dist_dbussystemservice_DATA += \
+ src/network/org.freedesktop.network1.service
+
+dist_dbuspolicy_DATA += \
+ src/network/org.freedesktop.network1.conf
+
+GENERAL_ALIASES += \
+ $(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
+ $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
+ $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
+
+SYSTEM_UNIT_ALIASES += \
+ systemd-networkd.service dbus-org.freedesktop.network1.service
+
+BUSNAMES_TARGET_WANTS += \
+ org.freedesktop.network1.busname
+
+endif # ENABLE_NETWORKD
+
+gperf_gperf_sources += \
+ src/network/networkd-gperf.gperf \
+ src/network/networkd-network-gperf.gperf \
+ src/network/networkd-netdev-gperf.gperf
+
+EXTRA_DIST += \
+ units/systemd-networkd.service.m4.in \
+ units/systemd-networkd-wait-online.service.in \
+ test/networkd-test.py
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index d2df9b7560..85635b59bc 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -21,11 +21,11 @@
#include <net/if.h>
#include <stdbool.h>
-#include "sd-device.h"
-#include "sd-hwdb.h"
-#include "sd-lldp.h"
-#include "sd-netlink.h"
-#include "sd-network.h"
+#include <systemd/sd-device.h>
+#include <systemd/sd-hwdb.h>
+#include <systemd/sd-lldp.h>
+#include <systemd/sd-netlink.h>
+#include <systemd/sd-network.h>
#include "alloc-util.h"
#include "arphrd-list.h"
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 37e13e639e..c5a3c52e94 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -20,7 +20,7 @@
#include <netinet/ether.h>
#include <linux/if.h>
-#include "sd-dhcp6-client.h"
+#include <systemd/sd-dhcp6-client.h>
#include "network-internal.h"
#include "networkd.h"
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
index 14c4a02c7e..90cb9b93f6 100644
--- a/src/network/networkd-link.h
+++ b/src/network/networkd-link.h
@@ -21,14 +21,14 @@
#include <endian.h>
-#include "sd-bus.h"
-#include "sd-dhcp-client.h"
-#include "sd-dhcp-server.h"
-#include "sd-dhcp6-client.h"
-#include "sd-ipv4ll.h"
-#include "sd-lldp.h"
-#include "sd-ndisc.h"
-#include "sd-netlink.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-dhcp-client.h>
+#include <systemd/sd-dhcp-server.h>
+#include <systemd/sd-dhcp6-client.h>
+#include <systemd/sd-ipv4ll.h>
+#include <systemd/sd-lldp.h>
+#include <systemd/sd-ndisc.h>
+#include <systemd/sd-netlink.h>
#include "list.h"
#include "set.h"
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 9174dcc7f4..7af7abaa81 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -20,8 +20,8 @@
#include <sys/socket.h>
#include <linux/if.h>
-#include "sd-daemon.h"
-#include "sd-netlink.h"
+#include <systemd/sd-daemon.h>
+#include <systemd/sd-netlink.h>
#include "alloc-util.h"
#include "bus-util.h"
diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c
index 1a380bd214..f3a4fc0fa5 100644
--- a/src/network/networkd-ndisc.c
+++ b/src/network/networkd-ndisc.c
@@ -22,7 +22,7 @@
#include <netinet/in.h>
#include <linux/if.h>
-#include "sd-ndisc.h"
+#include <systemd/sd-ndisc.h>
#include "networkd.h"
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
index 7913b0088e..7005b165d9 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/network/networkd-netdev-bond.c
@@ -21,7 +21,7 @@
#include <netinet/ether.h>
#include <linux/if_bonding.h>
-#include "sd-netlink.h"
+#include <systemd/sd-netlink.h>
#include "alloc-util.h"
#include "conf-parser.h"
diff --git a/src/network/networkd-netdev-tunnel.c b/src/network/networkd-netdev-tunnel.c
index 7aaa041ba3..26a9a972f1 100644
--- a/src/network/networkd-netdev-tunnel.c
+++ b/src/network/networkd-netdev-tunnel.c
@@ -23,7 +23,7 @@
#include <linux/if_tunnel.h>
#include <linux/ip6_tunnel.h>
-#include "sd-netlink.h"
+#include <systemd/sd-netlink.h>
#include "conf-parser.h"
#include "missing.h"
diff --git a/src/network/networkd-netdev-veth.c b/src/network/networkd-netdev-veth.c
index b122a06c25..185b441c5a 100644
--- a/src/network/networkd-netdev-veth.c
+++ b/src/network/networkd-netdev-veth.c
@@ -20,7 +20,7 @@
#include <net/if.h>
#include <linux/veth.h>
-#include "sd-netlink.h"
+#include <systemd/sd-netlink.h>
#include "networkd-netdev-veth.h"
diff --git a/src/network/networkd-netdev-vxlan.c b/src/network/networkd-netdev-vxlan.c
index 724f9861be..363a6bdde6 100644
--- a/src/network/networkd-netdev-vxlan.c
+++ b/src/network/networkd-netdev-vxlan.c
@@ -19,7 +19,7 @@
#include <net/if.h>
-#include "sd-netlink.h"
+#include <systemd/sd-netlink.h>
#include "conf-parser.h"
#include "alloc-util.h"
diff --git a/src/network/networkd-netdev.h b/src/network/networkd-netdev.h
index 20244c0309..ab3f068167 100644
--- a/src/network/networkd-netdev.h
+++ b/src/network/networkd-netdev.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-netlink.h"
+#include <systemd/sd-netlink.h>
#include "list.h"
#include "time-util.h"
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 91099161ce..177bc11ec4 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus.h"
+#include <systemd/sd-bus.h>
#include "udev.h"
#include "condition.h"
diff --git a/src/network/networkd-wait-online-link.c b/src/network/networkd-wait-online-link.c
index 5727422e3d..971545296f 100644
--- a/src/network/networkd-wait-online-link.c
+++ b/src/network/networkd-wait-online-link.c
@@ -18,7 +18,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-network.h"
+#include <systemd/sd-network.h>
#include "alloc-util.h"
#include "networkd-wait-online-link.h"
diff --git a/src/network/networkd-wait-online.c b/src/network/networkd-wait-online.c
index 3220c4b7ef..a08272463e 100644
--- a/src/network/networkd-wait-online.c
+++ b/src/network/networkd-wait-online.c
@@ -20,7 +20,7 @@
#include <getopt.h>
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
#include "networkd-wait-online.h"
#include "signal-util.h"
diff --git a/src/network/networkd-wait-online.h b/src/network/networkd-wait-online.h
index f91995c306..7ac7f4018a 100644
--- a/src/network/networkd-wait-online.h
+++ b/src/network/networkd-wait-online.h
@@ -19,9 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-event.h"
-#include "sd-netlink.h"
-#include "sd-network.h"
+#include <systemd/sd-event.h>
+#include <systemd/sd-netlink.h>
+#include <systemd/sd-network.h>
#include "hashmap.h"
diff --git a/src/network/networkd.c b/src/network/networkd.c
index c8f81a2ca6..9f5c75ac3d 100644
--- a/src/network/networkd.c
+++ b/src/network/networkd.c
@@ -17,7 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-daemon.h"
+#include <systemd/sd-daemon.h>
#include "capability-util.h"
#include "networkd.h"
diff --git a/src/network/networkd.h b/src/network/networkd.h
index ab512f0d08..b61e03920e 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -21,9 +21,9 @@
#include <arpa/inet.h>
-#include "sd-bus.h"
-#include "sd-event.h"
-#include "sd-netlink.h"
+#include <systemd/sd-bus.h>
+#include <systemd/sd-event.h>
+#include <systemd/sd-netlink.h>
#include "udev.h"
#include "dhcp-identifier.h"