summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-09-29 17:17:22 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-10-06 19:44:42 +0200
commit1939ebeb893ddf62bc80d74ef766a495f120b1a1 (patch)
treeef25960bf264fce1078c8075bbe6595375a5f39b /src
parentnetwork: drop unused arguments (diff)
downloadsystemd-1939ebeb893ddf62bc80d74ef766a495f120b1a1.tar.xz
systemd-1939ebeb893ddf62bc80d74ef766a495f120b1a1.zip
network: cleanup headers in networkd-neighbor.[ch]
Diffstat (limited to 'src')
-rw-r--r--src/network/netdev/macsec.h1
-rw-r--r--src/network/networkd-fdb.h1
-rw-r--r--src/network/networkd-manager.c1
-rw-r--r--src/network/networkd-neighbor.c6
-rw-r--r--src/network/networkd-neighbor.h17
-rw-r--r--src/network/networkd-network-gperf.gperf1
-rw-r--r--src/network/networkd-network.c1
-rw-r--r--src/network/networkd-network.h1
8 files changed, 14 insertions, 15 deletions
diff --git a/src/network/netdev/macsec.h b/src/network/netdev/macsec.h
index 2a3443a6d4..26ad2b7cca 100644
--- a/src/network/netdev/macsec.h
+++ b/src/network/netdev/macsec.h
@@ -4,6 +4,7 @@
#include <netinet/in.h>
#include <linux/if_macsec.h>
+#include "ether-addr-util.h"
#include "in-addr-util.h"
#include "netdev.h"
#include "networkd-util.h"
diff --git a/src/network/networkd-fdb.h b/src/network/networkd-fdb.h
index 5e24ad6aee..f607dfc70f 100644
--- a/src/network/networkd-fdb.h
+++ b/src/network/networkd-fdb.h
@@ -8,6 +8,7 @@
#include <linux/neighbour.h>
#include "conf-parser.h"
+#include "ether-addr-util.h"
#include "list.h"
#include "macro.h"
#include "networkd-util.h"
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 37a9745df8..cd0ad82e2e 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -29,6 +29,7 @@
#include "networkd-link-bus.h"
#include "networkd-manager-bus.h"
#include "networkd-manager.h"
+#include "networkd-neighbor.h"
#include "networkd-network-bus.h"
#include "networkd-nexthop.h"
#include "networkd-routing-policy-rule.h"
diff --git a/src/network/networkd-neighbor.c b/src/network/networkd-neighbor.c
index 28c8571a4b..f04a0b762c 100644
--- a/src/network/networkd-neighbor.c
+++ b/src/network/networkd-neighbor.c
@@ -1,16 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include "sd-netlink.h"
-
#include "alloc-util.h"
-#include "conf-parser.h"
-#include "ether-addr-util.h"
#include "hashmap.h"
-#include "in-addr-util.h"
#include "netlink-util.h"
#include "networkd-link.h"
#include "networkd-manager.h"
#include "networkd-neighbor.h"
+#include "networkd-network.h"
#include "set.h"
void neighbor_free(Neighbor *neighbor) {
diff --git a/src/network/networkd-neighbor.h b/src/network/networkd-neighbor.h
index 5f738f7d4a..56d1f66bf7 100644
--- a/src/network/networkd-neighbor.h
+++ b/src/network/networkd-neighbor.h
@@ -1,26 +1,25 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
+#include <stdbool.h>
+
#include "sd-netlink.h"
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "in-addr-util.h"
-#include "list.h"
-#include "macro.h"
-
-typedef struct Neighbor Neighbor;
-
-#include "networkd-link.h"
-#include "networkd-network.h"
#include "networkd-util.h"
+typedef Manager Manager;
+typedef Network Network;
+typedef Link Link;
+
union lladdr_union {
struct ether_addr mac;
union in_addr_union ip;
};
-struct Neighbor {
+typedef struct Neighbor {
Network *network;
Link *link;
NetworkConfigSection *section;
@@ -29,7 +28,7 @@ struct Neighbor {
union in_addr_union in_addr;
union lladdr_union lladdr;
size_t lladdr_size;
-};
+} Neighbor;
void neighbor_free(Neighbor *neighbor);
int neighbor_section_verify(Neighbor *neighbor);
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index 25a7b8991a..444b6fce9c 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -15,6 +15,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#include "networkd-ipv4ll.h"
#include "networkd-ndisc.h"
#include "networkd-network.h"
+#include "networkd-neighbor.h"
#include "networkd-nexthop.h"
#include "networkd-routing-policy-rule.h"
#include "networkd-sriov.h"
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index f4b03beeab..f0fd3ad3e9 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -15,6 +15,7 @@
#include "networkd-dhcp-server.h"
#include "network-internal.h"
#include "networkd-manager.h"
+#include "networkd-neighbor.h"
#include "networkd-network.h"
#include "networkd-nexthop.h"
#include "networkd-routing-policy-rule.h"
diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
index 5ab609bcc0..acc4378771 100644
--- a/src/network/networkd-network.h
+++ b/src/network/networkd-network.h
@@ -25,7 +25,6 @@
#include "networkd-lldp-tx.h"
#include "networkd-mdb.h"
#include "networkd-ndisc.h"
-#include "networkd-neighbor.h"
#include "networkd-radv.h"
#include "networkd-route.h"
#include "networkd-util.h"