]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: Clean up includes
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 21 May 2025 12:16:46 +0000 (14:16 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 21 May 2025 17:15:43 +0000 (02:15 +0900)
Split out of #37344.

243 files changed:
src/network/fuzz-netdev-parser.c
src/network/fuzz-network-parser.c
src/network/generator/network-generator-main.c
src/network/generator/network-generator.c
src/network/generator/test-network-generator.c
src/network/netdev/bareudp.c
src/network/netdev/bareudp.h
src/network/netdev/batadv.c
src/network/netdev/batadv.h
src/network/netdev/bond.c
src/network/netdev/bond.h
src/network/netdev/bridge.c
src/network/netdev/bridge.h
src/network/netdev/dummy.h
src/network/netdev/fou-tunnel.c
src/network/netdev/fou-tunnel.h
src/network/netdev/geneve.c
src/network/netdev/geneve.h
src/network/netdev/hsr.c
src/network/netdev/hsr.h
src/network/netdev/ipoib.c
src/network/netdev/ipoib.h
src/network/netdev/ipvlan.c
src/network/netdev/ipvlan.h
src/network/netdev/l2tp-tunnel.c
src/network/netdev/l2tp-tunnel.h
src/network/netdev/macsec.c
src/network/netdev/macsec.h
src/network/netdev/macvlan.c
src/network/netdev/macvlan.h
src/network/netdev/netdev-gperf.gperf
src/network/netdev/netdev-util.c
src/network/netdev/netdev-util.h
src/network/netdev/netdev.c
src/network/netdev/netdev.h
src/network/netdev/nlmon.h
src/network/netdev/tunnel.c
src/network/netdev/tunnel.h
src/network/netdev/tuntap.c
src/network/netdev/tuntap.h
src/network/netdev/vcan.h
src/network/netdev/veth.c
src/network/netdev/veth.h
src/network/netdev/vlan.c
src/network/netdev/vlan.h
src/network/netdev/vrf.c
src/network/netdev/vrf.h
src/network/netdev/vxcan.c
src/network/netdev/vxcan.h
src/network/netdev/vxlan.c
src/network/netdev/vxlan.h
src/network/netdev/wireguard.c
src/network/netdev/wireguard.h
src/network/netdev/wlan.c
src/network/netdev/wlan.h
src/network/netdev/xfrm.c
src/network/netdev/xfrm.h
src/network/networkctl-config-file.c
src/network/networkctl-description.c
src/network/networkctl-dump-util.c
src/network/networkctl-dump-util.h
src/network/networkctl-journal.c
src/network/networkctl-link-info.c
src/network/networkctl-link-info.h
src/network/networkctl-list.c
src/network/networkctl-lldp.c
src/network/networkctl-lldp.h
src/network/networkctl-misc.c
src/network/networkctl-status-link.c
src/network/networkctl-status-system.c
src/network/networkctl-status-system.h
src/network/networkctl-util.c
src/network/networkctl-util.h
src/network/networkctl.c
src/network/networkctl.h
src/network/networkd-address-generation.c
src/network/networkd-address-generation.h
src/network/networkd-address-label.c
src/network/networkd-address-label.h
src/network/networkd-address-pool.c
src/network/networkd-address-pool.h
src/network/networkd-address.c
src/network/networkd-address.h
src/network/networkd-bridge-fdb.c
src/network/networkd-bridge-fdb.h
src/network/networkd-bridge-mdb.c
src/network/networkd-bridge-mdb.h
src/network/networkd-bridge-vlan.c
src/network/networkd-bridge-vlan.h
src/network/networkd-can.c
src/network/networkd-can.h
src/network/networkd-conf.c
src/network/networkd-conf.h
src/network/networkd-dhcp-common.c
src/network/networkd-dhcp-common.h
src/network/networkd-dhcp-prefix-delegation.c
src/network/networkd-dhcp-prefix-delegation.h
src/network/networkd-dhcp-server-bus.c
src/network/networkd-dhcp-server-bus.h
src/network/networkd-dhcp-server-static-lease.c
src/network/networkd-dhcp-server-static-lease.h
src/network/networkd-dhcp-server.c
src/network/networkd-dhcp-server.h
src/network/networkd-dhcp4-bus.c
src/network/networkd-dhcp4-bus.h
src/network/networkd-dhcp4.c
src/network/networkd-dhcp4.h
src/network/networkd-dhcp6-bus.c
src/network/networkd-dhcp6-bus.h
src/network/networkd-dhcp6.c
src/network/networkd-dhcp6.h
src/network/networkd-dns.c
src/network/networkd-dns.h
src/network/networkd-forward.h [new file with mode: 0644]
src/network/networkd-ipv4acd.c
src/network/networkd-ipv4acd.h
src/network/networkd-ipv4ll.c
src/network/networkd-ipv4ll.h
src/network/networkd-ipv6-proxy-ndp.c
src/network/networkd-ipv6-proxy-ndp.h
src/network/networkd-ipv6ll.c
src/network/networkd-ipv6ll.h
src/network/networkd-json.c
src/network/networkd-json.h
src/network/networkd-link-bus.c
src/network/networkd-link-bus.h
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-lldp-rx.c
src/network/networkd-lldp-rx.h
src/network/networkd-lldp-tx.h
src/network/networkd-manager-bus.c
src/network/networkd-manager-bus.h
src/network/networkd-manager-varlink.c
src/network/networkd-manager-varlink.h
src/network/networkd-manager.c
src/network/networkd-manager.h
src/network/networkd-ndisc.c
src/network/networkd-ndisc.h
src/network/networkd-neighbor.c
src/network/networkd-neighbor.h
src/network/networkd-netlabel.c
src/network/networkd-netlabel.h
src/network/networkd-network-bus.c
src/network/networkd-network-bus.h
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/network/networkd-nexthop.c
src/network/networkd-nexthop.h
src/network/networkd-ntp.c
src/network/networkd-ntp.h
src/network/networkd-queue.c
src/network/networkd-queue.h
src/network/networkd-radv.c
src/network/networkd-radv.h
src/network/networkd-route-metric.c
src/network/networkd-route-metric.h
src/network/networkd-route-nexthop.c
src/network/networkd-route-nexthop.h
src/network/networkd-route-util.c
src/network/networkd-route-util.h
src/network/networkd-route.c
src/network/networkd-route.h
src/network/networkd-routing-policy-rule.c
src/network/networkd-routing-policy-rule.h
src/network/networkd-serialize.c
src/network/networkd-serialize.h
src/network/networkd-setlink.c
src/network/networkd-setlink.h
src/network/networkd-speed-meter.c
src/network/networkd-speed-meter.h
src/network/networkd-sriov.c
src/network/networkd-sriov.h
src/network/networkd-state-file.c
src/network/networkd-state-file.h
src/network/networkd-sysctl.c
src/network/networkd-sysctl.h
src/network/networkd-util.c
src/network/networkd-util.h
src/network/networkd-wifi.c
src/network/networkd-wifi.h
src/network/networkd-wiphy.c
src/network/networkd-wiphy.h
src/network/networkd.c
src/network/tc/cake.c
src/network/tc/cake.h
src/network/tc/codel.c
src/network/tc/codel.h
src/network/tc/drr.c
src/network/tc/drr.h
src/network/tc/ets.c
src/network/tc/ets.h
src/network/tc/fifo.c
src/network/tc/fifo.h
src/network/tc/fq-codel.c
src/network/tc/fq-codel.h
src/network/tc/fq-pie.c
src/network/tc/fq-pie.h
src/network/tc/fq.c
src/network/tc/fq.h
src/network/tc/gred.c
src/network/tc/gred.h
src/network/tc/hhf.c
src/network/tc/hhf.h
src/network/tc/htb.c
src/network/tc/htb.h
src/network/tc/mq.c
src/network/tc/mq.h
src/network/tc/multiq.c
src/network/tc/multiq.h
src/network/tc/netem.c
src/network/tc/netem.h
src/network/tc/pie.c
src/network/tc/pie.h
src/network/tc/qdisc.c
src/network/tc/qdisc.h
src/network/tc/qfq.c
src/network/tc/qfq.h
src/network/tc/sfb.c
src/network/tc/sfb.h
src/network/tc/sfq.c
src/network/tc/sfq.h
src/network/tc/tbf.c
src/network/tc/tbf.h
src/network/tc/tc-util.c
src/network/tc/tc-util.h
src/network/tc/tc.c
src/network/tc/tc.h
src/network/tc/tclass.c
src/network/tc/tclass.h
src/network/tc/teql.c
src/network/tc/teql.h
src/network/test-network-tables.c
src/network/test-network.c
src/network/test-networkd-conf.c
src/network/wait-online/dns-configuration.c
src/network/wait-online/dns-configuration.h
src/network/wait-online/wait-online-link.c
src/network/wait-online/wait-online-link.h
src/network/wait-online/wait-online-manager.c
src/network/wait-online/wait-online-manager.h
src/network/wait-online/wait-online.c

index 7e29ba9b8e8dd3fee665d5050faf7f1abdc42653..b7e3598fec33c93591baea0d212fe7a5802a4ad9 100644 (file)
@@ -1,7 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
-#include "fs-util.h"
 #include "fuzz.h"
 #include "networkd-manager.h"
 #include "tmpfile-util.h"
index eb17f09ca0959557694ef3607d89f45380f048d6..9e5cedc3cf70801113ab3153741ecd56749077b9 100644 (file)
@@ -1,7 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
-#include "fs-util.h"
 #include "fuzz.h"
 #include "networkd-manager.h"
 #include "tmpfile-util.h"
index 0d077585ba81362ab069b2e61cb714e461e547b7..c449a6d305bafb1d8cb8e6e4a4ae89f9dab4228f 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
+#include <sys/stat.h>
 
 #include "alloc-util.h"
 #include "build.h"
 #include "fd-util.h"
 #include "fs-util.h"
 #include "generator.h"
-#include "macro.h"
+#include "log.h"
 #include "main-func.h"
 #include "mkdir.h"
 #include "network-generator.h"
 #include "path-util.h"
 #include "proc-cmdline.h"
+#include "string-util.h"
 
 #define NETWORK_UNIT_DIRECTORY "/run/systemd/network/"
 
index d113e1cb46c71e1971e6c9832b3f7d5fb74af48d..31c1a2f723a9c14d56a52177eb0d20fb8f6116fc 100644 (file)
@@ -1,12 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+
 #include "alloc-util.h"
 #include "extract-word.h"
-#include "fd-util.h"
-#include "fileio.h"
 #include "hostname-util.h"
 #include "log.h"
-#include "macro.h"
 #include "memstream-util.h"
 #include "netif-naming-scheme.h"
 #include "network-generator.h"
index dec84abc8f12ee6eeb420f4ac1c9eb0c9cef3135..d709fa26ff7cedf40f6ebc36077f4f2e688a7721 100644 (file)
@@ -1,8 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "macro.h"
 #include "network-generator.h"
-#include "string-util.h"
 #include "tests.h"
 
 static void test_network_one(const char *ifname, const char *key, const char *value, const char *expected) {
index 9a8019eea9d4c5af5e30f91bf3472fbc9a3ca14f..9dd70296bc6c61f8c6a53115bb2b19a1c5d7280d 100644 (file)
@@ -2,11 +2,11 @@
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/if_arp.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "bareudp.h"
-#include "netlink-util.h"
-#include "networkd-manager.h"
+#include "conf-parser.h"
 #include "string-table.h"
 
 static const char* const bare_udp_protocol_table[_BARE_UDP_PROTOCOL_MAX] = {
index 6672cbde753c6bffc2c9901a982ccf5028463d2b..287769fa8338e7219b4fe777e9a59f5c408c4a77 100644 (file)
@@ -2,11 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-typedef struct BareUDP BareUDP;
-
-#include <linux/if_ether.h>
-
-#include "conf-parser.h"
+#include "forward.h"
 #include "netdev.h"
 
 typedef enum BareUDPProtocol {
@@ -18,13 +14,13 @@ typedef enum BareUDPProtocol {
         _BARE_UDP_PROTOCOL_INVALID = -EINVAL,
 } BareUDPProtocol;
 
-struct BareUDP {
+typedef struct BareUDP {
         NetDev meta;
 
         BareUDPProtocol iftype;
         uint16_t dest_port;
         uint16_t min_port;
-};
+} BareUDP;
 
 DEFINE_NETDEV_CAST(BAREUDP, BareUDP);
 extern const NetDevVTable bare_udp_vtable;
index c122aeec41df8bfdcb2aceb54ee675432356acbb..388dd42ebc5ef4b3ae37270a56bae8420c6e7e76 100644 (file)
@@ -1,19 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <inttypes.h>
-#include <linux/genetlink.h>
 #include <linux/if_arp.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "batadv.h"
-#include "fileio.h"
+#include "conf-parser.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "networkd-manager.h"
 #include "parse-util.h"
-#include "stdio-util.h"
 #include "string-table.h"
-#include "string-util.h"
 
 static void batadv_init(NetDev *n) {
         BatmanAdvanced *b = BATADV(n);
index f1f9b468859446a76496ca9eca449205d60ace20..df6183e27c84e7a07f53baea1663b08973a7756b 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <linux/batman_adv.h>
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "netdev.h"
 
 #define BATADV_GENL_NAME "batadv"
index a83a46bb6e614e9a8ffeec8a6ddf907ba7ab6dc3..0ae5fbdc43004594906437928fd99d4d512f776a 100644 (file)
@@ -3,16 +3,20 @@
 #include <linux/if_arp.h>
 #include <netinet/in.h>
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "bond.h"
 #include "bond-util.h"
 #include "conf-parser.h"
 #include "ether-addr-util.h"
 #include "extract-word.h"
-#include "netlink-util.h"
-#include "networkd-manager.h"
-#include "string-table.h"
-
+#include "in-addr-util.h"
+#include "networkd-link.h"
+#include "ordered-set.h"
+#include "set.h"
+#include "string-util.h"
+#include "time-util.h"
 /*
  * Number of seconds between instances where the bonding
  * driver sends learning packets to each slaves peer switch
index 6f349f86e4f29c14cadeb696a63c5c6008d564a4..8ae0c9650f06dba7697ffce43a86a9d93df6c21d 100644 (file)
@@ -1,13 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <linux/if_bonding.h>
-#include <netinet/in.h>
-
 #include "bond-util.h"
-#include "macro.h"
+#include "forward.h"
 #include "netdev.h"
-#include "ordered-set.h"
 
 typedef struct Bond {
         NetDev meta;
index afba0973b6b0539c4c1fb06f1a9bef798ce46d3c..cd992222550ce06e1e6cccd08fe532bf46b64cbd 100644 (file)
@@ -2,13 +2,15 @@
 
 #include <linux/if_arp.h>
 #include <linux/if_bridge.h>
-#include <net/if.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "bridge.h"
+#include "conf-parser.h"
 #include "netlink-util.h"
 #include "networkd-manager.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "vlan-util.h"
 
 assert_cc((int) MULTICAST_ROUTER_NONE            == (int) MDB_RTR_TYPE_DISABLED);
index a1d682bf8f3a7595c13593276b155d4a2a1588ae..1949f5ccd72cbc69bc4c2ec2502e35ad619c7cdb 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "netdev.h"
 
 #define LINK_BRIDGE_PORT_PRIORITY_INVALID 128U
index eafdf4b5bf1d70afe85e10ef35b83355a555cc87..725f4583991822093a036ab073778ea1aae245ab 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "forward.h"
 #include "netdev.h"
 
 typedef struct Dummy {
index 29240d4beafe627afc55be0c9f9b96cc73b5de5b..786ac9e0dd4c63dc8a645975a385b4530c9825aa 100644 (file)
@@ -1,16 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/fou.h>
-#include <linux/ip.h>
-#include <net/if.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "conf-parser.h"
 #include "fou-tunnel.h"
-#include "ip-protocol-list.h"
 #include "netlink-util.h"
 #include "networkd-manager.h"
-#include "parse-util.h"
 #include "string-table.h"
 #include "string-util.h"
 
index e8cab9e1617692c995357065299d8da35892d4cf..0a8fabec5e56c6ef8b41b0aad6ff7260b1a5f82e 100644 (file)
@@ -2,9 +2,9 @@
 #pragma once
 
 #include <linux/fou.h>
-#include <netinet/in.h>
 
 #include "in-addr-util.h"
+#include "forward.h"
 #include "netdev.h"
 
 typedef enum FooOverUDPEncapType {
index 8d203bcb917861d2743ccca8cd02f416fdea2a82..814e7cc3d45eb60487955ac90309c88506d5c0c8 100644 (file)
@@ -1,19 +1,14 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
 
-#include "alloc-util.h"
+#include "sd-netlink.h"
+
 #include "conf-parser.h"
-#include "extract-word.h"
 #include "geneve.h"
-#include "netlink-util.h"
-#include "networkd-manager.h"
 #include "parse-util.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "strv.h"
 
 #define GENEVE_FLOW_LABEL_MAX_MASK 0xFFFFFU
 #define DEFAULT_GENEVE_DESTINATION_PORT 6081
index 5fb441360de56c0bf991206c56d22515c9a359a6..9ad8eeaebb5762b56edbdffb2287672ce5f665b7 100644 (file)
@@ -1,11 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Geneve Geneve;
+#include <linux/if_link.h>
 
+#include "forward.h"
 #include "in-addr-util.h"
 #include "netdev.h"
-#include "networkd-network.h"
 
 #define GENEVE_VID_MAX (1u << 24) - 1
 
@@ -17,7 +17,7 @@ typedef enum GeneveDF {
         _NETDEV_GENEVE_DF_INVALID = -EINVAL,
 } GeneveDF;
 
-struct Geneve {
+typedef struct Geneve {
         NetDev meta;
 
         uint32_t id;
@@ -39,7 +39,7 @@ struct Geneve {
         union in_addr_union remote;
 
         bool inherit_inner_protocol;
-};
+} Geneve;
 
 DEFINE_NETDEV_CAST(GENEVE, Geneve);
 extern const NetDevVTable geneve_vtable;
index 975e439ce960d959a2e312af787a6f7f7c7a2a79..4c1549a2b368ab3ee456c55a6399198af67dd7d1 100644 (file)
@@ -1,12 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
 
+#include "sd-netlink.h"
+
+#include "conf-parser.h"
 #include "hsr.h"
-#include "netlink-util.h"
-#include "networkd-manager.h"
+#include "networkd-link.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
index 104a9f7aa83ba661015e3c92e184787202ed8864..62e98a806a3f2b75c5a9da76e2ef55d9f18ea88a 100644 (file)
@@ -1,8 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Hsr Hsr;
-
 #include <linux/if_link.h>
 
 #include "netdev.h"
@@ -14,13 +12,13 @@ typedef enum HsrProtocol {
         _NETDEV_HSR_PROTOCOL_INVALID = -EINVAL,
 } HsrProtocol;
 
-struct Hsr {
+typedef struct Hsr {
         NetDev meta;
 
         char **ports;
         HsrProtocol protocol;
         uint8_t supervision;
-};
+} Hsr;
 
 DEFINE_NETDEV_CAST(HSR, Hsr);
 extern const NetDevVTable hsr_vtable;
index 6932c62e2adde283ec51d5e126998588ca4e0d68..ca9147ec0b26d8e14eb0f983e44408faeb8ff439 100644 (file)
@@ -3,10 +3,14 @@
 #include <linux/if_arp.h>
 #include <linux/if_link.h>
 
+#include "sd-netlink.h"
+
+#include "conf-parser.h"
 #include "ipoib.h"
 #include "networkd-network.h"
 #include "parse-util.h"
 #include "string-table.h"
+#include "string-util.h"
 
 assert_cc((int) IP_OVER_INFINIBAND_MODE_DATAGRAM  == (int) IPOIB_MODE_DATAGRAM);
 assert_cc((int) IP_OVER_INFINIBAND_MODE_CONNECTED == (int) IPOIB_MODE_CONNECTED);
index 415d3b107c8eabf302ba29837c56c9672b8985d4..2e11490b55391cdc30b7c9a7cd538b53a67465a6 100644 (file)
@@ -1,9 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <errno.h>
-
-#include "conf-parser.h"
 #include "netdev.h"
 
 typedef enum IPoIBMode {
index 71e95ddc4ca2055ad37c1437bf66af1020e57e8b..284903e956d29084023cdeb0580fa36aecbddf27 100644 (file)
@@ -1,14 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "conf-parser.h"
 #include "ipvlan.h"
 #include "ipvlan-util.h"
 #include "networkd-link.h"
-#include "string-util.h"
 
 DEFINE_CONFIG_PARSE_ENUM(config_parse_ipvlan_mode, ipvlan_mode, IPVlanMode);
 DEFINE_CONFIG_PARSE_ENUM(config_parse_ipvlan_flags, ipvlan_flags, IPVlanFlags);
index 43ff2818e03315570bebb6e25a7ea8a3f9945041..ca7df0cb043b75ac53de5823e4631a26792ad50d 100644 (file)
@@ -1,8 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <linux/if_link.h>
-#include <netinet/in.h>
 
 #include "ipvlan-util.h"
 #include "netdev.h"
index 01741f2a690033301f79e6288fa23a3b0147b7ab..39f69c6c25caa0d32cd3b443c32a02018a17b878 100644 (file)
@@ -1,19 +1,20 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/genetlink.h>
 #include <linux/if_arp.h>
 #include <linux/l2tp.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
 #include "conf-parser.h"
+#include "extract-word.h"
 #include "hashmap.h"
 #include "l2tp-tunnel.h"
 #include "netlink-util.h"
 #include "networkd-address.h"
 #include "networkd-manager.h"
 #include "networkd-route-util.h"
-#include "parse-util.h"
+#include "set.h"
 #include "socket-util.h"
 #include "string-table.h"
 #include "string-util.h"
index a5f6fbad1e20eb0cbd496592b311fa6d59b3d5e1..2c4d2806fa777f88660048300564f07aa058c007 100644 (file)
@@ -2,11 +2,10 @@
 #pragma once
 
 #include <linux/l2tp.h>
-#include <netinet/in.h>
 
 #include "in-addr-util.h"
+#include "forward.h"
 #include "netdev.h"
-#include "networkd-util.h"
 
 typedef enum L2tpL2specType {
         NETDEV_L2TP_L2SPECTYPE_NONE = L2TP_L2SPECTYPE_NONE,
index df3ae99a0902bf167615b5b08de7cc25e15ac3b3..ff5d156a66e6a05cc01361f7b739eb6184c3533f 100644 (file)
@@ -1,10 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/genetlink.h>
 #include <linux/if_arp.h>
-#include <linux/if_ether.h>
 #include <linux/if_macsec.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
 #include "conf-parser.h"
@@ -17,8 +16,6 @@
 #include "networkd-manager.h"
 #include "parse-helpers.h"
 #include "parse-util.h"
-#include "socket-util.h"
-#include "string-table.h"
 #include "string-util.h"
 #include "unaligned.h"
 
index a78e7a359acc0f2f2d44d61a8f628468d37f2c54..3060a9a47c8fa3a842755f232325be428525e9e2 100644 (file)
@@ -2,12 +2,10 @@
 #pragma once
 
 #include <linux/if_macsec.h>
-#include <netinet/in.h>
+#include <net/ethernet.h>
 
-#include "ether-addr-util.h"
-#include "in-addr-util.h"
+#include "forward.h"
 #include "netdev.h"
-#include "networkd-util.h"
 #include "sparse-endian.h"
 
 /* See the definition of MACSEC_NUM_AN in kernel's drivers/net/macsec.c */
@@ -61,7 +59,7 @@ typedef struct ReceiveChannel {
         unsigned n_rxsa;
 } ReceiveChannel;
 
-struct MACsec {
+typedef struct MACsec {
         NetDev meta;
 
         uint16_t port;
@@ -72,7 +70,7 @@ struct MACsec {
         OrderedHashmap *receive_channels_by_section;
         OrderedHashmap *transmit_associations_by_section;
         OrderedHashmap *receive_associations_by_section;
-};
+} MACsec;
 
 DEFINE_NETDEV_CAST(MACSEC, MACsec);
 extern const NetDevVTable macsec_vtable;
index 3fe71fccdf905066dc9f61e047563a657ebeda52..3a44138f059f713561ec853a85b37dcf04ba076b 100644 (file)
@@ -1,14 +1,16 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "conf-parser.h"
 #include "macvlan.h"
 #include "macvlan-util.h"
 #include "networkd-network.h"
 #include "parse-util.h"
+#include "set.h"
+#include "string-util.h"
 
 typedef enum BCQueueThreshold {
         BC_QUEUE_THRESHOLD_UNDEF   = INT32_MIN,
index 76b53a62eae3bf13e41797d090b5b28ca507f074..68d757416a2f6342ca8b1631b1d9cb8369af972f 100644 (file)
@@ -1,13 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct MacVlan MacVlan;
-
 #include "macvlan-util.h"
 #include "netdev.h"
-#include "set.h"
 
-struct MacVlan {
+typedef struct MacVlan {
         NetDev meta;
 
         MacVlanMode mode;
@@ -15,7 +12,7 @@ struct MacVlan {
 
         uint32_t bc_queue_length;
         int32_t bc_queue_threshold;
-};
+} MacVlan;
 
 DEFINE_NETDEV_CAST(MACVLAN, MacVlan);
 DEFINE_NETDEV_CAST(MACVTAP, MacVlan);
index 35cc038c27d23a8e970a1e97ce9ad5c0bfe7eea9..379364df632023633afea1fa2b024500b89c8318 100644 (file)
@@ -9,6 +9,7 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
 #include "batadv.h"
 #include "bond.h"
 #include "bridge.h"
+#include "condition.h"
 #include "conf-parser.h"
 #include "fou-tunnel.h"
 #include "geneve.h"
index 6229992a1bf52f1b783b2ccbfa4bb7513f0bc9c1..e0555ebe4159a298e9a77c94d2c83762b7d2ba6c 100644 (file)
@@ -3,6 +3,7 @@
 #include "netdev-util.h"
 #include "networkd-address.h"
 #include "networkd-link.h"
+#include "set.h"
 #include "string-table.h"
 
 static const char * const netdev_local_address_type_table[_NETDEV_LOCAL_ADDRESS_TYPE_MAX] = {
index 089326c396285cb5ec236483f4435566896da7f9..847a6e732670f10619cdfb910cf7abb79956e04d 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <errno.h>
-
-#include "in-addr-util.h"
-#include "macro.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 typedef enum NetDevLocalAddressType {
         NETDEV_LOCAL_ADDRESS_IPV4LL,
index 2a27693d0b84100c647c1f43049f71643861361d..b99f3d31e32545a6471ed50615c5e89a95b6820f 100644 (file)
@@ -1,28 +1,28 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
 #include <unistd.h>
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "arphrd-util.h"
 #include "bareudp.h"
 #include "batadv.h"
 #include "bond.h"
 #include "bridge.h"
+#include "condition.h"
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "dummy.h"
-#include "fd-util.h"
 #include "fou-tunnel.h"
 #include "geneve.h"
+#include "hashmap.h"
 #include "hsr.h"
 #include "ifb.h"
 #include "ipoib.h"
 #include "ipvlan.h"
 #include "l2tp-tunnel.h"
-#include "list.h"
 #include "macsec.h"
 #include "macvlan.h"
 #include "netdev.h"
 #include "network-util.h"
 #include "networkd-manager.h"
 #include "networkd-queue.h"
-#include "networkd-setlink.h"
 #include "networkd-sriov.h"
 #include "networkd-state-file.h"
 #include "nlmon.h"
-#include "path-lookup.h"
-#include "siphash24.h"
 #include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
index 52c1c211983be706f79aa35403b17e5d0fc54687..8837e6991c0e88b9b4975f100010242c86745b1f 100644 (file)
@@ -1,15 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
 #include "ether-addr-util.h"
-#include "hash-funcs.h"
 #include "list.h"
 #include "log-link.h"
 #include "netdev-util.h"
-#include "time-util.h"
+#include "networkd-forward.h"
 
 /* Special hardware address value to suppress generating persistent hardware address for the netdev. */
 #define HW_ADDR_NONE ((struct hw_addr_data) { .length = 1, })
@@ -109,9 +105,6 @@ typedef enum NetDevCreateType {
         _NETDEV_CREATE_INVALID = -EINVAL,
 } NetDevCreateType;
 
-typedef struct Manager Manager;
-typedef struct Condition Condition;
-
 typedef struct NetDev {
         Manager *manager;
 
index edfc504bca64022533697759e86e306bbd0a1735..4fee148563c91b680cb454cd626d07bbdf905169 100644 (file)
@@ -1,13 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct NLMon NLMon;
-
 #include "netdev.h"
 
-struct NLMon {
+typedef struct NLMon {
         NetDev meta;
-};
+} NLMon;
 
 DEFINE_NETDEV_CAST(NLMON, NLMon);
 
index ef47218c9f2505522fb62fffc3449d2bf1ec3f77..26a97271f05ef4c59b2aa5c26c202810fc3da849 100644 (file)
@@ -1,13 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/fou.h>
 #include <linux/if_arp.h>
 #include <linux/if_tunnel.h>
-#include <linux/ip.h>
 #include <linux/ip6_tunnel.h>
 #include <netinet/in.h>
 
-#include "af-list.h"
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "conf-parser.h"
 #include "hexdecoct.h"
index 34fdbfaf428ab0256d210b3d35bc29c3f47d3a72..26aab55213fea5516f44feeb1124374540a253ad 100644 (file)
@@ -1,11 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "fou-tunnel.h"
-#include "in-addr-util.h"
 #include "netdev.h"
-#include "netdev-util.h"
 #include "networkd-link.h"
 
 typedef enum Ip6TnlMode {
index e060d95bd94241e833b6054038b4f41af045d542..0121ce6a35a567c0afe4c92114144508018280cb 100644 (file)
@@ -1,21 +1,21 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <errno.h>
 #include <fcntl.h>
 #include <linux/if_tun.h>
 #include <net/if.h>
-#include <netinet/if_ether.h>
+#include <net/if_arp.h>
 #include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
 
 #include "alloc-util.h"
 #include "daemon-util.h"
 #include "fd-util.h"
-#include "networkd-link.h"
+#include "hashmap.h"
 #include "networkd-manager.h"
 #include "socket-util.h"
+#include "string-util.h"
 #include "tuntap.h"
+#include "user-record.h"
+#include "user-util.h"
 #include "userdb.h"
 
 #define TUN_DEV "/dev/net/tun"
index f345548f9546a53ceb7651a47f040423901d3678..406f2c3f783c0a313ec4c6085021a7146840c294 100644 (file)
@@ -1,8 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "forward.h"
 #include "netdev.h"
-#include "user-util.h"
 
 typedef struct TunTap {
         NetDev meta;
index f149eb2bb83569f36b93b9bdef734998bb1aa4e5..16dd1d916d59eb4f2a76036b6e88d555462cd39d 100644 (file)
@@ -1,16 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct VCan VCan;
-
-#include <linux/can/netlink.h>
-#include <netinet/in.h>
-
 #include "netdev.h"
 
-struct VCan {
+typedef struct VCan {
         NetDev meta;
-};
+} VCan;
 
 DEFINE_NETDEV_CAST(VCAN, VCan);
 
index d263e35748bcdb60f7ff684b160da04aafbbce44..94aea195b195d2ff74e9d19a5d3f5369735bc00b 100644 (file)
@@ -1,12 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <errno.h>
 #include <linux/if_arp.h>
 #include <linux/veth.h>
-#include <net/if.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "netlink-util.h"
+#include "string-util.h"
 #include "veth.h"
 
 static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
index 8ee973385b65f95d63829998280e695d92bb2e8f..1bf6b585cf98a07807d0b3bf571b092301e5a2b3 100644 (file)
@@ -1,17 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Veth Veth;
-
 #include "netdev.h"
 
-struct Veth {
+typedef struct Veth {
         NetDev meta;
 
         char *ifname_peer;
         struct hw_addr_data hw_addr_peer;
         int ifindex_peer;
-};
+} Veth;
 
 DEFINE_NETDEV_CAST(VETH, Veth);
 extern const NetDevVTable veth_vtable;
index 0f62fcaff385af6e3f62ea66ad5cee59f6dece70..a962d8495254ea1a2de735528eb620e80d2e5a1a 100644 (file)
@@ -1,12 +1,16 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <errno.h>
 #include <linux/if_arp.h>
 #include <linux/if_vlan.h>
-#include <net/if.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
+#include "extract-word.h"
 #include "parse-util.h"
+#include "set.h"
+#include "siphash24.h"
+#include "string-util.h"
 #include "vlan.h"
 #include "vlan-util.h"
 
index 1e5e5904fcdc788a8da060ce70c412c16e9b4ece..073f21a9f3056ecc745aeb92ad0338914c2e79ee 100644 (file)
@@ -1,12 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct VLan VLan;
-
+#include "forward.h"
 #include "netdev.h"
-#include "set.h"
 
-struct VLan {
+typedef struct VLan {
         NetDev meta;
 
         uint16_t id;
@@ -19,7 +17,7 @@ struct VLan {
 
         Set *egress_qos_maps;
         Set *ingress_qos_maps;
-};
+} VLan;
 
 DEFINE_NETDEV_CAST(VLAN, VLan);
 extern const NetDevVTable vlan_vtable;
index 6a8d6e8f31a3b10fb8206cf6bef197e6d44e8512..540c269f2d38dd00034257a951999ba7440c2fc8 100644 (file)
@@ -1,8 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
+
+#include "sd-netlink.h"
 
 #include "vrf.h"
 
index 87977e230ca1707c981dc02c048d1252d1906c6b..7bf94478567a7506810a3a73d832ac20c464734d 100644 (file)
@@ -1,15 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Vrf Vrf;
-
 #include "netdev.h"
 
-struct Vrf {
+typedef struct Vrf {
         NetDev meta;
 
         uint32_t table;
-};
+} Vrf;
 
 DEFINE_NETDEV_CAST(VRF, Vrf);
 extern const NetDevVTable vrf_vtable;
index 2de89b8e24425a8f0ce7cbfe79a4e6627e4da681..35c3a98a8c1a949d324854a4f2865bae233a700d 100644 (file)
@@ -3,6 +3,9 @@
 #include <linux/can/vxcan.h>
 #include <linux/if_arp.h>
 
+#include "sd-netlink.h"
+
+#include "string-util.h"
 #include "vxcan.h"
 
 static int netdev_vxcan_fill_message_create(NetDev *netdev, Link *link, sd_netlink_message *m) {
index b835ce2c91a4e4b9158838d0a1bc89fc1b187787..65e0a26d1ecb6173488444ec3afd2724316ab4e7 100644 (file)
@@ -1,16 +1,14 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct VxCan VxCan;
-
 #include "netdev.h"
 
-struct VxCan {
+typedef struct VxCan {
         NetDev meta;
 
         char *ifname_peer;
         int ifindex_peer;
-};
+} VxCan;
 
 DEFINE_NETDEV_CAST(VXCAN, VxCan);
 
index 1796cf764ec2d21b8ae24839740bb75e35ffe74a..12eacab3779bcd141de7e14165cc2eb7708a8531 100644 (file)
@@ -1,17 +1,16 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
-#include <net/if.h>
-#include <netinet/in.h>
 
-#include "alloc-util.h"
+#include "sd-netlink.h"
+
 #include "conf-parser.h"
-#include "extract-word.h"
+#include "in-addr-util.h"
 #include "networkd-link.h"
 #include "parse-util.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "strv.h"
+#include "time-util.h"
 #include "vxlan.h"
 
 static const char* const df_table[_NETDEV_VXLAN_DF_MAX] = {
index cb0386adbe2e594f836db2da3f325a258845d5d5..1787eceb9118dfdb223a7b6c1b80a5022ab3469f 100644 (file)
@@ -1,13 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct VxLan VxLan;
-
 #include <linux/if_link.h>
 
 #include "in-addr-util.h"
 #include "netdev.h"
-#include "netdev-util.h"
 
 #define VXLAN_VID_MAX (1u << 24) - 1
 #define VXLAN_FLOW_LABEL_MAX_MASK 0xFFFFFU
@@ -20,7 +17,7 @@ typedef enum VxLanDF {
         _NETDEV_VXLAN_DF_INVALID = -EINVAL,
 } VxLanDF;
 
-struct VxLan {
+typedef struct VxLan {
         NetDev meta;
 
         uint32_t vni;
@@ -63,7 +60,7 @@ struct VxLan {
         bool vnifilter;
 
         struct ifla_vxlan_port_range port_range;
-};
+} VxLan;
 
 DEFINE_NETDEV_CAST(VXLAN, VxLan);
 extern const NetDevVTable vxlan_vtable;
index 69584bbec180febc991bbd5b8ce6d2e80bc934d5..1a731fc451f1ecf2d91444c722102cb453506342 100644 (file)
@@ -4,19 +4,20 @@
 ***/
 
 #include <linux/if_arp.h>
-#include <linux/ipv6_route.h>
-#include <net/if.h>
+#include <netdb.h>
 #include <netinet/in.h>
-#include <sys/ioctl.h>
 
+#include "sd-netlink.h"
 #include "sd-resolve.h"
 
 #include "alloc-util.h"
+#include "conf-parser.h"
 #include "creds-util.h"
 #include "dns-domain.h"
 #include "event-util.h"
-#include "fd-util.h"
+#include "extract-word.h"
 #include "fileio.h"
+#include "hashmap.h"
 #include "hexdecoct.h"
 #include "memory-util.h"
 #include "netlink-util.h"
@@ -28,9 +29,8 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "random-util.h"
-#include "resolve-private.h"
+#include "set.h"
 #include "string-util.h"
-#include "strv.h"
 #include "wireguard.h"
 
 static void wireguard_resolve_endpoints(NetDev *netdev);
index 3925f4787b8e680be41cd76ad966f1bd949a3d75..3bf885651479062d226727b04b49616c6896c015 100644 (file)
@@ -2,16 +2,12 @@
 
 #pragma once
 
-typedef struct Wireguard Wireguard;
-
 #include <linux/wireguard.h>
-#include <netinet/in.h>
-
-#include "sd-event.h"
-#include "sd-resolve.h"
 
 #include "in-addr-util.h"
+#include "list.h"
 #include "netdev.h"
+#include "networkd-forward.h"
 #include "socket-util.h"
 
 typedef struct WireguardIPmask {
@@ -50,7 +46,7 @@ typedef struct WireguardPeer {
         LIST_FIELDS(struct WireguardPeer, peers);
 } WireguardPeer;
 
-struct Wireguard {
+typedef struct Wireguard {
         NetDev meta;
         unsigned last_peer_section;
 
@@ -66,7 +62,7 @@ struct Wireguard {
         Set *routes;
         uint32_t route_table;
         uint32_t route_priority;
-};
+} Wireguard;
 
 DEFINE_NETDEV_CAST(WIREGUARD, Wireguard);
 extern const NetDevVTable wireguard_vtable;
index 5b9db8b219ba90eeee0a5506cb5433bed51a0c0b..37e7e67d539e137717d1932a9d3bdbf80cdf138d 100644 (file)
@@ -8,6 +8,7 @@
 #include "networkd-manager.h"
 #include "networkd-wiphy.h"
 #include "parse-util.h"
+#include "string-util.h"
 #include "wifi-util.h"
 #include "wlan.h"
 
index bcc2dbcfd0cb41d5338b5f0d94ecb036379b5668..4b4ca79b602bbca9334ba364241285be80d03581 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/nl80211.h>
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "netdev.h"
 
 typedef struct WLan {
index 4a91ab4158bb029281d64d1b85bd3f6d1c640e52..07015a9434beb94a15b6d1489433be1e6a6b34af 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <linux/if_arp.h>
 
+#include "sd-netlink.h"
+
 #include "missing_network.h"
 #include "networkd-link.h"
 #include "xfrm.h"
index f56c4f272ac1db5a03beca0050692f2780636388..aafbca8939ec4f1b497bc41d5fb274d9e642ca97 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "forward.h"
 #include "netdev.h"
 
 typedef struct Xfrm {
index 776aa5638d1b734d9608169fab8adce6d446f4e9..a5e7b4da019e9f88be9b8ae91f8dcbfa6b421dfb 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <unistd.h>
 
+#include "sd-bus.h"
 #include "sd-daemon.h"
 #include "sd-device.h"
 #include "sd-netlink.h"
@@ -14,6 +15,7 @@
 #include "bus-wait-for-jobs.h"
 #include "conf-files.h"
 #include "edit-util.h"
+#include "errno-util.h"
 #include "extract-word.h"
 #include "log.h"
 #include "mkdir-label.h"
 #include "networkctl-config-file.h"
 #include "networkctl-util.h"
 #include "pager.h"
-#include "path-lookup.h"
 #include "path-util.h"
 #include "pretty-print.h"
 #include "selinux-util.h"
+#include "socket-util.h"
 #include "stat-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "strv.h"
+#include "terminal-util.h"
 #include "virt.h"
 
 typedef enum ReloadFlags {
index 8c52a46e7f7065e5ed1ca05a9d5a3934f076a454..fd6cbd78817b86dda83da7292dcae8aef4765977 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-bus.h"
+
 #include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-locator.h"
index a174f8727280b6e506ed2ce32cf10c9473189e1a..20d5e8f43cc00b6a5881dd867730834d4888c6cd 100644 (file)
@@ -1,12 +1,19 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-dhcp-lease.h"
+#include "sd-hwdb.h"
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
+#include "ether-addr-util.h"
 #include "format-ifname.h"
+#include "format-table.h"
 #include "in-addr-util.h"
 #include "local-addresses.h"
 #include "log.h"
 #include "networkctl-dump-util.h"
 #include "stdio-util.h"
+#include "string-util.h"
 #include "strv.h"
 
 int dump_list(Table *table, const char *key, char * const *l) {
index c4dfae9a46c29c252fe49aca03946391338170ac..e7950a59ac0af675d1490a9809b7bc11f630a38a 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-dhcp-lease.h"
-#include "sd-hwdb.h"
-#include "sd-netlink.h"
-
-#include "ether-addr-util.h"
-#include "format-table.h"
+#include "forward.h"
 
 int dump_list(Table *table, const char *key, char * const *l);
 int ieee_oui(sd_hwdb *hwdb, const struct ether_addr *mac, char **ret);
index ca94410aee489768705b222a65d7ecb6e240e603..c54d9a9a8c2445bf82cf79e6e39ae3c36e5059eb 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-journal.h"
+
 #include "ansi-color.h"
 #include "journal-internal.h"
 #include "log.h"
index c687da9e0f8ccac3e0a8a082581c8bee7829f40d..9db89be8a8c899912c53451f923d5542c4a85248 100644 (file)
@@ -2,6 +2,9 @@
 
 #include <linux/if_tunnel.h>
 
+#include "sd-bus.h"
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-error.h"
@@ -13,6 +16,8 @@
 #include "networkctl-link-info.h"
 #include "networkctl-util.h"
 #include "sort-util.h"
+#include "stdio-util.h"
+#include "string-util.h"
 #include "strv.h"
 #include "strxcpyx.h"
 #include "wifi-util.h"
index 5dc5e7e25f602ea8639c4c05e2a1e89159229bdf..1dfd910e35bda04e0a5623c7742220e32b930c62 100644 (file)
@@ -3,14 +3,10 @@
 #include <linux/if.h>
 #include <linux/if_link.h>
 #include <linux/nl80211.h>
-#include <stdint.h>
-
-#include "sd-bus.h"
-#include "sd-device.h"
-#include "sd-netlink.h"
 
 #include "ether-addr-util.h"
 #include "ethtool-util.h"
+#include "forward.h"
 #include "in-addr-util.h"
 
 typedef struct VxLanInfo {
index 4cb976216e11a2ec0d9c2c600571f97bfe485eee..23012060c0ccf172c2b4b02a80609702e4baaf52 100644 (file)
@@ -1,5 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-bus.h"
+#include "sd-netlink.h"
 #include "sd-network.h"
 
 #include "alloc-util.h"
index ef2f3ffef70c361293af87fd3e0f7db2e1ba3b8e..43727a1b82fcdff399ce97e2d4c56b1e8c759ba2 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
+#include "format-table.h"
 #include "json-util.h"
 #include "log.h"
 #include "networkctl.h"
@@ -8,6 +9,7 @@
 #include "networkctl-lldp.h"
 #include "networkctl-util.h"
 #include "stdio-util.h"
+#include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "varlink-util.h"
index 3ec6fe76c118468914e3fc3ed31ebcecd2b2c1c8..abbab831330ba1cac5ad534d6e3b31da936f8fe1 100644 (file)
@@ -1,9 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-varlink.h"
-
-#include "format-table.h"
+#include "forward.h"
 
 int dump_lldp_neighbors(sd_varlink *vl, Table *table, int ifindex);
 int link_lldp_status(int argc, char *argv[], void *userdata);
index 1f6c6fdcb2621eedf9858a46308ed18c3115cf32..4166b90061a517626a6067291b88a4ebc96778ab 100644 (file)
@@ -1,9 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <net/if.h>
+#include "sd-bus.h"
+#include "sd-netlink.h"
 
 #include "bus-error.h"
 #include "bus-locator.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "format-ifname.h"
 #include "log.h"
@@ -14,7 +16,7 @@
 #include "parse-util.h"
 #include "polkit-agent.h"
 #include "set.h"
-#include "strv.h"
+#include "string-util.h"
 #include "varlink-util.h"
 
 static int link_up_down_send_message(sd_netlink *rtnl, char *command, int index) {
index a2a451f6c0a153bbf40c3fe3a0273af11cbfe62d..5d54b8607f77fe652615bee4ddde22eca3a86c54 100644 (file)
@@ -1,16 +1,23 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <net/if.h>
-
+#include "sd-bus.h"
+#include "sd-device.h"
+#include "sd-dhcp-client-id.h"
+#include "sd-dhcp-lease.h"
+#include "sd-hwdb.h"
+#include "sd-netlink.h"
 #include "sd-network.h"
+#include "sd-varlink.h"
 
 #include "alloc-util.h"
 #include "bond-util.h"
 #include "bridge-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
+#include "errno-util.h"
 #include "escape.h"
 #include "extract-word.h"
+#include "format-table.h"
 #include "format-util.h"
 #include "geneve-util.h"
 #include "glyph-util.h"
@@ -28,7 +35,9 @@
 #include "networkctl-status-system.h"
 #include "networkctl-util.h"
 #include "stdio-util.h"
+#include "string-util.h"
 #include "strv.h"
+#include "time-util.h"
 #include "udev-util.h"
 
 static int dump_dhcp_leases(Table *table, const char *prefix, sd_bus *bus, const LinkInfo *link) {
index dcd04586775eaa7e055ecefa297e6af6bf8b403e..bb1b5d1377bfa5a12e750d2ec29f54bf033fddd2 100644 (file)
@@ -3,6 +3,7 @@
 #include "sd-network.h"
 
 #include "alloc-util.h"
+#include "format-table.h"
 #include "fs-util.h"
 #include "glyph-util.h"
 #include "log.h"
@@ -12,6 +13,7 @@
 #include "networkctl-status-system.h"
 #include "networkctl-util.h"
 #include "sort-util.h"
+#include "string-util.h"
 #include "strv.h"
 
 static int ifindex_str_compare_func(char * const *a, char * const *b) {
index 8d9da175c456106dbef14628d20a786d738a02f6..a3292a85f0fc4674ef190ad65a4acba84476aca9 100644 (file)
@@ -1,7 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-hwdb.h"
-#include "sd-netlink.h"
+#include "forward.h"
 
 int system_status(sd_netlink *rtnl, sd_hwdb *hwdb);
index 08cceb44e883ed1aa1281cdfcb872b935875d51a..37fa4835973af818b655492922850814dec071fe 100644 (file)
@@ -3,12 +3,15 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "sd-bus.h"
+
 #include "alloc-util.h"
 #include "ansi-color.h"
 #include "log.h"
 #include "networkctl.h"
 #include "networkctl-util.h"
 #include "stdio-util.h"
+#include "string-util.h"
 #include "strv.h"
 #include "varlink-util.h"
 
index 10792152dcd4d8f36a7fa5bce81b2b665f5a601b..c8e2be8cd517c1c32e693c68c67de6ed2e35e8f1 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-#include "sd-bus.h"
-#include "sd-varlink.h"
+#include "forward.h"
 
 int varlink_connect_networkd(sd_varlink **ret_varlink);
 bool networkd_is_running(void);
index cee7be5ee159071267b40e29587fe7be0acde543..2f1354259a5f4308ad1dcc7a8870839db817eb49 100644 (file)
 #include "networkctl-lldp.h"
 #include "networkctl-misc.h"
 #include "networkctl-status-link.h"
-#include "networkctl-util.h"
 #include "parse-argument.h"
 #include "parse-util.h"
 #include "path-util.h"
 #include "pretty-print.h"
+#include "string-util.h"
 #include "verbs.h"
 
 PagerFlags arg_pager_flags = 0;
index cb76fe41e1bf5cf8f5d0260085f443bcb1031fc0..39c81e794705ac023db81a9323de9b92255d361b 100644 (file)
@@ -1,9 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-#include "output-mode.h"
+#include "forward.h"
 #include "pager.h"
 
 extern PagerFlags arg_pager_flags;
index 18840e02d13822e1dc6fb68b8f376341bda053dc..c94ce750bca7d27c4f8bb3c0ff0971afb3ada20e 100644 (file)
@@ -6,11 +6,14 @@
 
 #include "alloc-util.h"
 #include "arphrd-util.h"
+#include "hash-funcs.h"
 #include "id128-util.h"
-#include "memory-util.h"
 #include "networkd-address-generation.h"
+#include "networkd-address.h"
 #include "networkd-link.h"
 #include "networkd-network.h"
+#include "set.h"
+#include "siphash24.h"
 #include "string-util.h"
 
 #define DAD_CONFLICTS_IDGEN_RETRIES_RFC7217 3
index 2c6091321aeb6bc727ef32ef5390ed983ff8f028..c08794f253a43663470c3f7683feff19421fba64 100644 (file)
@@ -1,13 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-#include "hashmap.h"
-#include "in-addr-util.h"
-
-typedef struct Address Address;
-typedef struct IPv6Token IPv6Token;
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 IPv6Token* ipv6_token_ref(IPv6Token *token);
 IPv6Token* ipv6_token_unref(IPv6Token *token);
index 5f7a2b7ede4c98fb9520827080ad1205a23a2c98..124fc94e1428c6d10f055136a4e20bf83fe76370 100644 (file)
@@ -1,16 +1,20 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <linux/if_addr.h>
 #include <linux/if_addrlabel.h>
-#include <net/if.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
-#include "netlink-util.h"
+#include "conf-parser.h"
+#include "hashmap.h"
 #include "networkd-address-label.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "networkd-queue.h"
 #include "parse-util.h"
+#include "string-util.h"
 
 AddressLabel *address_label_free(AddressLabel *label) {
         if (!label)
index f0c7943545aedf6f5a94ed36dec0d838abe76fd7..dc0cd5be1f1824f389ef01af4a29a857012126fc 100644 (file)
@@ -1,15 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
+#include <netinet/in.h>
 
-#include "conf-parser.h"
-#include "in-addr-util.h"
-#include "networkd-util.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 typedef struct AddressLabel {
         Manager *manager;
index c3f9fb71e1705c0b73eeacec6baf02de8bdcfdc4..a93d2ddfa65aaa7bba59f80a29f50bf3efa9fcca 100644 (file)
@@ -5,7 +5,8 @@
 #include "networkd-address-pool.h"
 #include "networkd-manager.h"
 #include "networkd-queue.h"
-#include "string-util.h"
+#include "ordered-set.h"
+#include "set.h"
 
 #define RANDOM_PREFIX_TRIAL_MAX  1024
 
index 93bdec82e3fced798a33ee085b1b673dcbd2ea3d..c40258f03c7a0b5bcfa4e687c2b386931e1ece5b 100644 (file)
@@ -1,10 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "networkd-forward.h"
 #include "in-addr-util.h"
 
-typedef struct Manager Manager;
-
 typedef struct AddressPool {
         Manager *manager;
 
index acf22f205355691e5a5269e7b257a59baaabb7aa..ab6ed78f4d5dcce874301611958c7ce18480bb42 100644 (file)
@@ -1,16 +1,21 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
-#include <net/if_arp.h>
+#include <stdio.h>
+
+#include "sd-event.h"
+#include "sd-netlink.h"
 
 #include "af-list.h"
 #include "alloc-util.h"
 #include "bitfield.h"
+#include "conf-parser.h"
+#include "errno-util.h"
 #include "firewall-util.h"
 #include "in-addr-prefix-util.h"
 #include "logarithm.h"
-#include "memory-util.h"
 #include "netlink-util.h"
+#include "networkd-address-generation.h"
 #include "networkd-address.h"
 #include "networkd-address-pool.h"
 #include "networkd-dhcp-prefix-delegation.h"
 #include "networkd-queue.h"
 #include "networkd-route.h"
 #include "networkd-route-util.h"
+#include "ordered-set.h"
 #include "parse-util.h"
+#include "set.h"
+#include "siphash24.h"
+#include "socket-util.h"
 #include "string-util.h"
 #include "strv.h"
-#include "strxcpyx.h"
 
 #define ADDRESSES_PER_LINK_MAX 16384U
 #define STATIC_ADDRESSES_PER_NETWORK_MAX 8192U
index 1c171a476a2aaec4218f2292c0c2aa0d1b6ce93f..c68ecb5ec0962d12728b660a242aa72a940deafd 100644 (file)
@@ -1,24 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-#include <stdbool.h>
-#include <stdio.h>
-
-#include "conf-parser.h"
 #include "firewall-util.h"
-#include "hash-funcs.h"
+#include "forward.h"
 #include "in-addr-util.h"
-#include "network-util.h"
-#include "networkd-address-generation.h"
-#include "networkd-link.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
-#include "time-util.h"
 
-typedef struct Address Address;
-typedef struct Manager Manager;
-typedef struct Network Network;
-typedef struct Request Request;
 typedef int (*address_ready_callback_t)(Address *address);
 typedef int (*address_netlink_handler_t)(
                 sd_netlink *rtnl,
@@ -27,7 +15,7 @@ typedef int (*address_netlink_handler_t)(
                 Link *link,
                 Address *address);
 
-struct Address {
+typedef struct Address {
         Link *link;
         Network *network;
         ConfigSection *section;
@@ -71,7 +59,7 @@ struct Address {
         address_ready_callback_t callback;
 
         NFTSetContext nft_set_context;
-};
+} Address;
 
 void log_address_debug(const Address *address, const char *str, const Link *link);
 
index 9a455d8ba3a8c96200bf3d8eefc2f5da05ba1499..6a635a880185ad11353c1dc88a66f8dc16c10f1b 100644 (file)
@@ -3,11 +3,11 @@
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
 
-#include <net/ethernet.h>
-#include <net/if.h>
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
-#include "bridge.h"
+#include "conf-parser.h"
+#include "hashmap.h"
 #include "netlink-util.h"
 #include "networkd-bridge-fdb.h"
 #include "networkd-link.h"
@@ -16,7 +16,9 @@
 #include "networkd-queue.h"
 #include "networkd-util.h"
 #include "parse-util.h"
+#include "socket-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "vlan-util.h"
 #include "vxlan.h"
 
index 8bb50627cbb1f320c2a2bb40df1ecefce39b48a6..0c60a4ad1b9cc9e5b51bf4d2dcec55f2373e5c20 100644 (file)
@@ -5,15 +5,12 @@
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
 
-#include <inttypes.h>
 #include <linux/neighbour.h>
+#include <net/ethernet.h>
 
-#include "conf-parser.h"
-#include "ether-addr-util.h"
+#include "forward.h"
 #include "in-addr-util.h"
-
-typedef struct Link Link;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 typedef enum NeighborCacheEntryFlags {
         NEIGHBOR_CACHE_ENTRY_FLAGS_USE = NTF_USE,
index aba4571352c10aed66048c431e17500393620032..b868901b762089a2661b54cf5a1accdeb7620c9d 100644 (file)
@@ -1,9 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_bridge.h>
-#include <net/if.h>
 
-#include "netlink-util.h"
+#include "sd-netlink.h"
+
+#include "conf-parser.h"
+#include "hashmap.h"
 #include "networkd-bridge-mdb.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
index 89c70fb68f0338d35daffa174c3d85b319929903..4cb67214073aac1aca1b13aa5fde7123ad21cca1 100644 (file)
@@ -1,14 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
 #include <net/ethernet.h>
 
-#include "conf-parser.h"
 #include "in-addr-util.h"
-
-typedef struct Link Link;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 typedef enum BridgeMDBEntryType {
         BRIDGE_MDB_ENTRY_TYPE_L2,
index c9be1dd0499ac3c36060f6896de2fc75f8821c01..e36374dad27d13d1f8d929285efe1188c7f2232f 100644 (file)
@@ -4,17 +4,16 @@
 ***/
 
 #include <linux/if_bridge.h>
-#include <netinet/in.h>
-#include <stdbool.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
-#include "conf-parser.h"
 #include "netlink-util.h"
 #include "networkd-bridge-vlan.h"
 #include "networkd-link.h"
-#include "networkd-manager.h"
 #include "networkd-network.h"
 #include "parse-util.h"
+#include "string-util.h"
 #include "vlan-util.h"
 
 static bool is_bit_set(unsigned nr, const uint32_t *addr) {
index 0366cc6feea33c4915f5383fe3705794c65180b6..f497a1f6708cb9c11f756040eeeed11f95c7780c 100644 (file)
@@ -5,12 +5,7 @@
   Copyright © 2016 BISDN GmbH. All rights reserved.
 ***/
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
+#include "networkd-forward.h"
 #include "vlan-util.h"
 
 #define BRIDGE_VLAN_BITMAP_MAX 4096
@@ -20,9 +15,6 @@
 #define BRIDGE_VLAN_REMOVE_PVID (UINT16_MAX - 1)
 assert_cc(BRIDGE_VLAN_REMOVE_PVID > VLANID_MAX);
 
-typedef struct Link Link;
-typedef struct Network Network;
-
 void network_adjust_bridge_vlan(Network *network);
 
 int bridge_vlan_set_message(Link *link, sd_netlink_message *m, bool is_set);
index abd5518097c9a26f541a12e542cda53037d90604..3cb4ed1100d2234a6766d15ae92d723235333a5b 100644 (file)
@@ -1,12 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/can/netlink.h>
-#include <net/if.h>
+
+#include "sd-netlink.h"
 
 #include "networkd-can.h"
 #include "networkd-link.h"
 #include "networkd-network.h"
-#include "networkd-setlink.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index 3945082498f30bf218ff770d749db20fb1ae7265..52d0604548b5e102feb4b147e1d07b20b73ffe2f 100644 (file)
@@ -1,13 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <linux/can/netlink.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 int can_set_netlink_message(Link *link, sd_netlink_message *m);
 
index 0ec45d3dd91b9e8837afd1a7a187fe4e537fb79f..bce16284f84e9a2e1e13a54b727e13743cca3c2f 100644 (file)
@@ -4,7 +4,6 @@
  ***/
 
 #include "conf-parser.h"
-#include "constants.h"
 #include "networkd-address-label.h"
 #include "networkd-conf.h"
 #include "networkd-manager.h"
index 6f8612ac9191f0c874d1c1e6afc087fe4d5ecd45..ccd574fdbf2032ccd62c2c28105b366fa516025c 100644 (file)
@@ -5,9 +5,7 @@
   Copyright © 2014 Vinay Kulkarni <kulkarniv@vmware.com>
 ***/
 
-#include "conf-parser.h"
-
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 int manager_parse_config_file(Manager *m);
 
index 2edc94d13ebafefaf9bd74737989bd0af9871e15..74555cf78fa2b95b0a769e9685dd2257f4db3c0e 100644 (file)
@@ -1,14 +1,20 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
+#include <linux/rtnetlink.h>
 #include <netinet/in.h>
 
+#include "sd-bus.h"
+#include "sd-dhcp6-lease.h"
+#include "sd-dhcp6-option.h"
+
 #include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-locator.h"
 #include "dhcp-option.h"
-#include "dhcp6-internal.h"
+#include "dhcp6-option.h"
 #include "escape.h"
+#include "extract-word.h"
 #include "hexdecoct.h"
 #include "in-addr-prefix-util.h"
 #include "networkd-dhcp-common.h"
 #include "networkd-network.h"
 #include "networkd-route-util.h"
 #include "parse-util.h"
+#include "set.h"
 #include "socket-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "strv.h"
 #include "vrf.h"
 
index 778378f5ff742fc0543e1fa832379eb098cb0163..859c174f977bbc086d779dbea50e73cac5a30464 100644 (file)
@@ -3,12 +3,9 @@
 
 #include <netinet/in.h>
 
-#include "conf-parser.h"
 #include "dhcp-duid-internal.h"
-#include "dns-resolver-internal.h"
 #include "in-addr-util.h"
-#include "set.h"
-#include "time-util.h"
+#include "networkd-forward.h"
 
 /* Special values for *_uplink_index. */
 #define UPLINK_INDEX_AUTO  0 /* uplink will be selected automatically */
 #define IPV6RA_ROUTE_METRIC_LOW    2048
 #define DHCP6PD_ROUTE_METRIC 256
 
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
-
 typedef enum DHCPOptionDataType {
         DHCP_OPTION_DATA_UINT8,
         DHCP_OPTION_DATA_UINT16,
index e519896fa07714c084b6ea02cad58b391c2f2ec9..1a5ccf1d20dbe0df131a0076d3b353b64610dd93 100644 (file)
@@ -1,8 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/ipv6_route.h>
+#include <linux/rtnetlink.h>
+
+#include "sd-dhcp-client.h"
+#include "sd-dhcp6-client.h"
+#include "sd-netlink.h"
+#include "sd-radv.h"
 
 #include "dhcp6-lease-internal.h"
+#include "errno-util.h"
 #include "hashmap.h"
 #include "in-addr-prefix-util.h"
 #include "networkd-address.h"
@@ -17,6 +24,7 @@
 #include "networkd-route-util.h"
 #include "networkd-setlink.h"
 #include "parse-util.h"
+#include "set.h"
 #include "string-util.h"
 #include "strv.h"
 #include "tunnel.h"
index 27e920e1cf06280a79b94a447beca288342fad77..3ffc2beb5411d5dee4bdf216d811b1c42540f01d 100644 (file)
@@ -1,16 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-#include "sd-dhcp-lease.h"
-#include "sd-dhcp6-lease.h"
-
-#include "conf-parser.h"
-
-typedef struct Address Address;
-typedef struct Link Link;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 bool link_dhcp_pd_is_enabled(Link *link);
 bool dhcp_pd_is_uplink(Link *link, Link *target, bool accept_auto);
index 8a6822e2b7aa1a335bf067d35372ce2139d9fc5a..14effff529a0a3c41d976f54528743def2ed45de 100644 (file)
@@ -1,13 +1,14 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-bus.h"
+
 #include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
+#include "bus-object.h"
 #include "dhcp-server-lease-internal.h"
+#include "hashmap.h"
 #include "networkd-dhcp-server-bus.h"
 #include "networkd-link-bus.h"
 #include "networkd-manager.h"
-#include "strv.h"
 
 static int property_get_leases(
                 sd_bus *bus,
index f52be8253e1227d85063977fcb626d314d16008a..1d818df4c7ea829547517b6e53ab0b44c32d98b8 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
-#include "sd-dhcp-server.h"
-
-#include "bus-object.h"
+#include "networkd-forward.h"
 
 extern const BusObjectImplementation dhcp_server_object;
 
index b8c7e4dde8bd941ef9a791d5475519e5ae90c1d7..1d13c9e7b9862d37ed536b7e940f525f16488e37 100644 (file)
@@ -1,11 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
+#include "conf-parser.h"
 #include "ether-addr-util.h"
 #include "hashmap.h"
 #include "networkd-dhcp-server-static-lease.h"
 #include "networkd-network.h"
-#include "networkd-util.h"
+#include "string-util.h"
 
 static DHCPStaticLease* dhcp_static_lease_free(DHCPStaticLease *static_lease) {
         if (!static_lease)
index fe8e249d5a73ec2290eb81c5788e0364868b1eb2..11711a38a773cf06507623034a2d8bda347d0a73 100644 (file)
@@ -2,13 +2,9 @@
 
 #pragma once
 
-#include <inttypes.h>
+#include <netinet/in.h>
 
-#include "conf-parser.h"
-#include "in-addr-util.h"
-
-typedef struct Network Network;
-typedef struct ConfigSection ConfigSection;
+#include "networkd-forward.h"
 
 typedef struct DHCPStaticLease {
         Network *network;
index 45b92d9ec0c559859c7ee993fcf986fc760d5073..6679e4ed41dcac631395c5049e37fb1a44be6d1b 100644 (file)
@@ -1,15 +1,18 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <linux/if_arp.h>
 #include <netinet/in.h>
 
 #include "sd-dhcp-server.h"
 
+#include "conf-parser.h"
 #include "dhcp-protocol.h"
 #include "dhcp-server-lease-internal.h"
+#include "errno-util.h"
+#include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
+#include "hashmap.h"
 #include "network-common.h"
 #include "networkd-address.h"
 #include "networkd-dhcp-server.h"
 #include "networkd-ntp.h"
 #include "networkd-queue.h"
 #include "networkd-route-util.h"
-#include "parse-util.h"
 #include "path-util.h"
+#include "set.h"
 #include "socket-netlink.h"
-#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 
index e839fac00b44675b4251779bc8799213c7c78bd6..419088f3066c5d4e867faeace45e8d89855d2b30 100644 (file)
@@ -1,14 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-#include "in-addr-util.h"
-#include "set.h"
-
-typedef struct Address Address;
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 int network_adjust_dhcp_server(Network *network, Set **addresses);
 int address_acquire_from_dhcp_server_leases_file(Link *link, const Address *address, union in_addr_union *ret);
index 68fe7bc394b8016ba3bd7bc9dfe910ca670e5183..9162a5ce427d5e407b99bc2ff2cf2ff5722ba55b 100644 (file)
@@ -1,16 +1,14 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-bus.h"
 #include "sd-dhcp-client.h"
 
 #include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
+#include "bus-object.h"
 #include "dhcp-client-internal.h"
 #include "networkd-dhcp4-bus.h"
 #include "networkd-link-bus.h"
 #include "networkd-manager.h"
-#include "string-table.h"
-#include "strv.h"
 
 static int property_get_dhcp_client_state(
                 sd_bus *bus,
index 482e824c0ac1e8e49b1efb7d16ba16de0514055b..037202e4d512f3b8991d27c8beba9d6042e73c70 100644 (file)
@@ -1,9 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-dhcp-client.h"
-
-#include "networkd-link-bus.h"
+#include "networkd-forward.h"
 
 extern const BusObjectImplementation dhcp_client_object;
 
index b94935ebd992926d803791139c265d0e4f366849..7bb203e70a5233e5c665a57dcb567183578d2d84 100644 (file)
@@ -1,16 +1,20 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <linux/if_arp.h>
+#include <linux/rtnetlink.h>
 #include <netinet/in.h>
 #include <netinet/ip.h>
+#include <stdio.h>
+
+#include "sd-dhcp-protocol.h"
+#include "sd-ipv4ll.h"
 
 #include "alloc-util.h"
+#include "conf-parser.h"
 #include "device-private.h"
 #include "dhcp-client-internal.h"
+#include "errno-util.h"
 #include "hostname-setup.h"
-#include "hostname-util.h"
-#include "network-internal.h"
 #include "networkd-address.h"
 #include "networkd-dhcp-prefix-delegation.h"
 #include "networkd-dhcp4.h"
 #include "networkd-setlink.h"
 #include "networkd-state-file.h"
 #include "parse-util.h"
+#include "set.h"
+#include "socket-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "strv.h"
-#include "sysctl-util.h"
 
 void network_adjust_dhcp4(Network *network) {
         assert(network);
index 401ff59f694f44f18f9cc175aa35e62ab5be615c..2d6cc9bbc8e973071b1acecf775aeb3bb40588cc 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-
-typedef struct Link Link;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 typedef enum DHCPClientIdentifier {
         DHCP_CLIENT_ID_MAC,
index 7f37ca09eb6841813d1609b41c055c92cbc08e69..ee2f645df3aa27b94c696fae3d0a679c6df6afe6 100644 (file)
@@ -1,15 +1,14 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-bus.h"
+
 #include "alloc-util.h"
-#include "bus-common-errors.h"
-#include "bus-util.h"
+#include "bus-object.h"
 #include "dhcp6-client-internal.h"
 #include "dhcp6-protocol.h"
 #include "networkd-dhcp6-bus.h"
 #include "networkd-link-bus.h"
 #include "networkd-manager.h"
-#include "string-table.h"
-#include "strv.h"
 
 static int property_get_dhcp6_client_state(
                 sd_bus *bus,
index 76a6b727aa8027be11ba17256a2e674c388b3981..c60581a31d04d1c5a6c72f7e533e7a5b4c3419c0 100644 (file)
@@ -1,9 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-dhcp6-client.h"
-
-#include "networkd-link-bus.h"
+#include "networkd-forward.h"
 
 extern const BusObjectImplementation dhcp6_client_object;
 
index 222d791e4b467019da8b27b456f69f12b0a35fad..4806980993a4e924ebe42f4c9c131af9b422b7e7 100644 (file)
@@ -3,11 +3,17 @@
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
 
+#include <linux/if_addr.h>
+#include <stdio.h>
+
+#include "sd-dhcp6-protocol.h"
+
+#include "conf-parser.h"
 #include "dhcp6-client-internal.h"
 #include "dhcp6-lease-internal.h"
+#include "errno-util.h"
 #include "hashmap.h"
 #include "hostname-setup.h"
-#include "hostname-util.h"
 #include "networkd-address.h"
 #include "networkd-dhcp-prefix-delegation.h"
 #include "networkd-dhcp6.h"
@@ -18,6 +24,7 @@
 #include "networkd-queue.h"
 #include "networkd-route.h"
 #include "networkd-state-file.h"
+#include "set.h"
 #include "string-table.h"
 #include "string-util.h"
 
index 89915a19ac1f44e3747bd32dd64868906919c9c5..5ce5c2c97b96ed06720d7d180a67c7f976615594 100644 (file)
@@ -1,8 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-#include "macro.h"
+#include "networkd-forward.h"
 
 typedef enum DHCP6ClientStartMode {
         DHCP6_CLIENT_START_MODE_NO,
@@ -12,9 +11,6 @@ typedef enum DHCP6ClientStartMode {
         _DHCP6_CLIENT_START_MODE_INVALID = -EINVAL,
 } DHCP6ClientStartMode;
 
-typedef struct Link Link;
-typedef struct Network Network;
-
 bool link_dhcp6_with_address_enabled(Link *link);
 int dhcp6_check_ready(Link *link);
 int dhcp6_update_mac(Link *link);
index cd0cd287399baf3614cfaa3a49c4bb669a82ea3e..9648a508d2a98cb4077b48bba8cb16c2b5665f01 100644 (file)
@@ -1,13 +1,17 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
+#include "conf-parser.h"
 #include "dns-domain.h"
+#include "extract-word.h"
 #include "hostname-util.h"
 #include "networkd-dns.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
-#include "parse-util.h"
+#include "ordered-set.h"
+#include "set.h"
 #include "string-table.h"
+#include "string-util.h"
 
 UseDomains link_get_use_domains(Link *link, NetworkConfigSource proto) {
         UseDomains n, c, m;
index e273d10328967b181727d56b134b1ab00d16714c..95d38c7c29767a0194c1b60a352d3b23a1412b14 100644 (file)
@@ -1,12 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-#include "macro.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
 
-typedef struct Link Link;
-
 typedef enum UseDomains {
         USE_DOMAINS_NO,
         USE_DOMAINS_YES,
diff --git a/src/network/networkd-forward.h b/src/network/networkd-forward.h
new file mode 100644 (file)
index 0000000..b1b385f
--- /dev/null
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "conf-parser-forward.h"    /* IWYU pragma: export */
+#include "forward.h"                /* IWYU pragma: export */
+
+typedef enum NetDevLocalAddressType NetDevLocalAddressType;
+typedef enum NetworkConfigSource NetworkConfigSource;
+
+typedef struct Address Address;
+typedef struct IPv6Token IPv6Token;
+typedef struct Link Link;
+typedef struct Manager Manager;
+typedef struct NetDev NetDev;
+typedef struct Network Network;
+typedef struct NextHop NextHop;
+typedef struct Request Request;
+typedef struct Route Route;
+typedef struct Wireguard Wireguard;
index 3c938546bf84e284688ee41d96983825705ba06f..8a0e5b85d0883a45e7f97bf21c0ebd9a9dff7ff6 100644 (file)
@@ -6,12 +6,14 @@
 #include "sd-dhcp-client.h"
 #include "sd-ipv4acd.h"
 
+#include "hashmap.h"
 #include "ipvlan.h"
 #include "networkd-address.h"
 #include "networkd-dhcp4.h"
 #include "networkd-ipv4acd.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
+#include "string-util.h"
 
 DEFINE_PRIVATE_HASH_OPS_FULL(
         ipv4acd_hash_ops,
index 75b4c97a05d57551cf5835dd407b6435882b262c..5e0d0ccf470a08c21513311d331875b8693a44ab 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-typedef struct Address Address;
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 bool link_ipv4acd_supported(Link *link);
 bool link_ipv4acd_enabled(Link *link);
index 7c20c7f49f073b3e441f30347f591a33723e199e..ff8a17211e415e8e043ad59a130ba88e42420932 100644 (file)
@@ -1,16 +1,21 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
+#include <linux/rtnetlink.h>
 #include <netinet/in.h>
 
+#include "sd-event.h"
+#include "sd-ipv4ll.h"
+
+#include "errno-util.h"
 #include "netif-util.h"
 #include "networkd-address.h"
 #include "networkd-ipv4acd.h"
 #include "networkd-ipv4ll.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
-#include "networkd-queue.h"
 #include "parse-util.h"
+#include "set.h"
+#include "string-util.h"
 
 bool link_ipv4ll_enabled(Link *link) {
         assert(link);
index 71cddbdd5bd155a1df2e0c116a89bf2e763dbd7d..d7718aaf2da28a422f4dd68e8aa5d130d7c2057e 100644 (file)
@@ -1,13 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
+#include "networkd-forward.h"
 
 #define IPV4LL_ROUTE_METRIC 2048
 
-typedef struct Link Link;
-typedef struct Network Network;
-
 bool link_ipv4ll_enabled(Link *link);
 
 int ipv4ll_configure(Link *link);
index d1bac5862d0379d8fb0405da9ef646e5a8eaf29e..89f4418990f7a6fe9a88d317342be63a2cef9a35 100644 (file)
@@ -1,14 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <netinet/in.h>
 
-#include "netlink-util.h"
+#include "sd-netlink.h"
+
 #include "networkd-ipv6-proxy-ndp.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "networkd-queue.h"
+#include "set.h"
 #include "socket-util.h"
 #include "string-util.h"
 
index e57d28f99ddf87cd182a6b6454baa5d9aa0c7b29..7a2953a001acacf468a9d16cab0e4fa08eb05592 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-
-typedef struct Link Link;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 void network_adjust_ipv6_proxy_ndp(Network *network);
 
index 04f51ab530f26cf1ca24d37074bab9fb3cc95bc4..c64dbbb980bf2e55c5d6947b9d5f67181d77bc12 100644 (file)
@@ -1,17 +1,21 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <linux/if_arp.h>
 
+#include "sd-netlink.h"
+
+#include "conf-parser.h"
+#include "hashmap.h"
 #include "in-addr-util.h"
 #include "networkd-address.h"
 #include "networkd-ipv6ll.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
-#include "networkd-util.h"
+#include "siphash24.h"
 #include "socket-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "strv.h"
 #include "sysctl-util.h"
 
index 2759eed7f70dc11eb8da6988ab581dd4d00a0cd4..7005f7a6679e2de4f7c05caae30101827b3bdda6 100644 (file)
@@ -1,16 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <errno.h>
 #include <linux/if_link.h>
-#include <stdbool.h>
 
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
-#include "macro.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 typedef enum IPv6LinkLocalAddressGenMode {
        IPV6_LINK_LOCAL_ADDRESSS_GEN_MODE_EUI64          = IN6_ADDR_GEN_MODE_EUI64,
index 59af619d1375b4b7471568292a6f9216a8cef2bd..d07227d2882ab871a0f4d62f69fe017a2d15805a 100644 (file)
@@ -2,11 +2,14 @@
 
 #include <linux/nexthop.h>
 
+#include "sd-device.h"
+#include "sd-dhcp-client.h"
+#include "sd-dhcp6-client.h"
+
 #include "dhcp-lease-internal.h"
 #include "dhcp-server-lease-internal.h"
-#include "dhcp6-internal.h"
 #include "dhcp6-lease-internal.h"
-#include "dns-domain.h"
+#include "extract-word.h"
 #include "ip-protocol-list.h"
 #include "json-util.h"
 #include "netif-util.h"
 #include "networkd-route.h"
 #include "networkd-route-util.h"
 #include "networkd-routing-policy-rule.h"
-#include "sort-util.h"
+#include "ordered-set.h"
+#include "set.h"
+#include "string-util.h"
 #include "strv.h"
 #include "udev-util.h"
-#include "user-util.h"
 #include "wifi-util.h"
 
 static int address_append_json(Address *address, bool serializing, sd_json_variant **array) {
@@ -926,7 +930,7 @@ static int domains_append_json(Link *link, bool is_route, sd_json_variant **v) {
                         NDiscDNSSL *a;
 
                         SET_FOREACH(a, link->ndisc_dnssl) {
-                                r = domain_append_json(AF_INET6, NDISC_DNSSL_DOMAIN(a), NETWORK_CONFIG_SOURCE_NDISC,
+                                r = domain_append_json(AF_INET6, ndisc_dnssl_domain(a), NETWORK_CONFIG_SOURCE_NDISC,
                                                        &(union in_addr_union) { .in6 = a->router },
                                                        &array);
                                 if (r < 0)
index ada2500e392c218b2a489d06a15d045f5bc0fa86..35a0eeed70b7eca4047890863ad6545a24f1383d 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-#include "sd-json.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 int addresses_append_json(Link *link, bool serializing, sd_json_variant **v);
 int nexthops_append_json(Manager *manager, int ifindex, sd_json_variant **v);
index 9e8ae7635d58cec4276c506539bfe05e750ca255..bd477a2d1c57c32e5ea1ec7532fe94c8f7d9bb80 100644 (file)
@@ -1,13 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
-#include <netinet/in.h>
-#include <sys/capability.h>
+
+#include "sd-bus.h"
+#include "sd-dhcp-server.h"
 
 #include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-get-properties.h"
 #include "bus-message-util.h"
+#include "bus-object.h"
 #include "bus-polkit.h"
 #include "dns-domain.h"
 #include "networkd-dhcp4.h"
 #include "networkd-link-bus.h"
 #include "networkd-manager.h"
 #include "networkd-state-file.h"
+#include "ordered-set.h"
 #include "parse-util.h"
 #include "resolve-util.h"
+#include "set.h"
 #include "socket-netlink.h"
+#include "string-util.h"
 #include "strv.h"
-#include "user-util.h"
 
 BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState);
 BUS_DEFINE_PROPERTY_GET_ENUM(property_get_carrier_state, link_carrier_state, LinkCarrierState);
index 7b0156b4df6195e5c02a95cd0cfb4a14f205ef26..d70894f3037567db38e1be4ebfc4f44208efa103 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
-
-#include "bus-object.h"
-#include "macro.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 extern const BusObjectImplementation link_object;
 
index 58614a5d2655470833094b8f77136fafea08f6d3..96739b0d0a6d6df25a6a3f8948f7a3a0f72d77e4 100644 (file)
@@ -5,38 +5,38 @@
 #include <linux/if_link.h>
 #include <linux/netdevice.h>
 #include <net/if.h>
-#include <netinet/in.h>
 #include <sys/socket.h>
 #include <unistd.h>
 
+#include "sd-bus.h"
+#include "sd-dhcp-client.h"
+#include "sd-dhcp-server.h"
+#include "sd-dhcp6-client.h"
+#include "sd-dhcp6-lease.h"
+#include "sd-ipv4ll.h"
+#include "sd-lldp-rx.h"
+#include "sd-ndisc.h"
+#include "sd-netlink.h"
+#include "sd-radv.h"
+
 #include "alloc-util.h"
 #include "arphrd-util.h"
-#include "batadv.h"
 #include "bitfield.h"
-#include "bond.h"
-#include "bridge.h"
-#include "bus-util.h"
-#include "device-private.h"
 #include "device-util.h"
-#include "dhcp-lease-internal.h"
-#include "env-file.h"
+#include "errno-util.h"
 #include "ethtool-util.h"
 #include "event-util.h"
-#include "fd-util.h"
-#include "fileio.h"
 #include "format-ifname.h"
 #include "fs-util.h"
 #include "glyph-util.h"
 #include "logarithm.h"
-#include "missing_network.h"
+#include "netif-util.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "networkd-address.h"
 #include "networkd-address-label.h"
 #include "networkd-bridge-fdb.h"
 #include "networkd-bridge-mdb.h"
 #include "networkd-bridge-vlan.h"
-#include "networkd-can.h"
 #include "networkd-dhcp-prefix-delegation.h"
 #include "networkd-dhcp-server.h"
 #include "networkd-dhcp4.h"
 #include "networkd-state-file.h"
 #include "networkd-sysctl.h"
 #include "networkd-wifi.h"
+#include "ordered-set.h"
 #include "parse-util.h"
 #include "set.h"
 #include "socket-util.h"
-#include "stdio-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "strv.h"
 #include "tc.h"
-#include "tuntap.h"
 #include "udev-util.h"
-#include "vrf.h"
 
 void link_required_operstate_for_online(Link *link, LinkOperationalStateRange *ret) {
         assert(link);
@@ -2098,6 +2097,11 @@ void link_update_operstate(Link *link, bool also_update_master) {
         }
 }
 
+bool link_has_carrier(Link *link) {
+        assert(link);
+        return netif_has_carrier(link->kernel_operstate, link->flags);
+}
+
 #define FLAG_STRING(string, flag, old, new)                      \
         (((old ^ new) & flag)                                    \
          ? ((old & flag) ? (" -" string) : (" +" string))        \
index acfbf75028b4bea5ae4576fc91944af8a8ebffcf..2f4b784291f9b8c49c8254fb7ad74cce2524914c 100644 (file)
@@ -1,34 +1,16 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <endian.h>
 #include <linux/nl80211.h>
 
-#include "sd-bus.h"
-#include "sd-device.h"
-#include "sd-dhcp-client.h"
-#include "sd-dhcp-server.h"
-#include "sd-dhcp6-client.h"
-#include "sd-ipv4acd.h"
-#include "sd-ipv4ll.h"
-#include "sd-lldp-rx.h"
-#include "sd-lldp-tx.h"
-#include "sd-ndisc.h"
-#include "sd-netlink.h"
-#include "sd-radv.h"
-
 #include "ether-addr-util.h"
-#include "log-link.h"
-#include "netdev.h"
-#include "netif-util.h"
+#include "forward.h"
 #include "network-util.h"
 #include "networkd-bridge-vlan.h"
+#include "networkd-forward.h"
 #include "networkd-ipv6ll.h"
-#include "networkd-util.h"
-#include "ordered-set.h"
 #include "ratelimit.h"
 #include "resolve-util.h"
-#include "set.h"
 
 typedef enum LinkState {
         LINK_STATE_PENDING,     /* udev has not initialized the link */
@@ -47,11 +29,6 @@ typedef enum LinkReconfigurationFlag {
         LINK_RECONFIGURE_CLEANLY         = 1 << 1, /* Drop all existing configs before reconfiguring. Otherwise, reuse existing configs as possible as we can. */
 } LinkReconfigurationFlag;
 
-typedef struct Manager Manager;
-typedef struct Network Network;
-typedef struct NetDev NetDev;
-typedef struct DUID DUID;
-
 typedef struct Link {
         Manager *manager;
 
@@ -251,10 +228,7 @@ void link_check_ready(Link *link);
 
 void link_update_operstate(Link *link, bool also_update_bond_master);
 
-static inline bool link_has_carrier(Link *link) {
-        assert(link);
-        return netif_has_carrier(link->kernel_operstate, link->flags);
-}
+bool link_has_carrier(Link *link);
 
 bool link_ipv6_enabled(Link *link);
 int link_ipv6ll_gained(Link *link);
index 169221aa65160d627c1ea2728d6a7d01c8080c8d..8c76f2222f6dc370a19310a2ed8a52faa8ac077a 100644 (file)
@@ -2,18 +2,15 @@
 
 #include <net/if.h>
 #include <net/if_arp.h>
-#include <unistd.h>
 
-#include "fd-util.h"
-#include "fileio.h"
-#include "fs-util.h"
+#include "sd-lldp-rx.h"
+
+#include "conf-parser.h"
 #include "networkd-link.h"
 #include "networkd-lldp-rx.h"
-#include "networkd-lldp-tx.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "string-table.h"
-#include "string-util.h"
 #include "strv.h"
 
 DEFINE_CONFIG_PARSE_ENUM(config_parse_lldp_mode, lldp_mode, LLDPMode);
index 75c9f8ca8602fbfc3b992c1e589319de82c038e7..d098616e4dcae252ba18146493755141ea6d9545 100644 (file)
@@ -1,9 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 typedef enum LLDPMode {
         LLDP_MODE_NO = 0,
index 346eb5cb1cb7507491189ded53ae6fef797acf6a..9fd087bb94b73f7e49813e869a5281e27af7d066 100644 (file)
@@ -1,9 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 int link_lldp_tx_configure(Link *link);
 int link_lldp_tx_update_capabilities(Link *link);
index c9a61d96ad86b3db6011854dad593b22be667a77..f04a15487d17a1c3dc8b373490948f686facd8b1 100644 (file)
@@ -1,13 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <sys/capability.h>
+#include <sys/stat.h>
+
+#include "sd-bus.h"
 
 #include "alloc-util.h"
 #include "bus-common-errors.h"
 #include "bus-message-util.h"
+#include "bus-object.h"
 #include "bus-polkit.h"
+#include "hashmap.h"
 #include "networkd-dhcp-server-bus.h"
 #include "networkd-dhcp4-bus.h"
 #include "networkd-dhcp6-bus.h"
@@ -18,8 +20,6 @@
 #include "networkd-manager-bus.h"
 #include "networkd-network-bus.h"
 #include "path-util.h"
-#include "strv.h"
-#include "user-util.h"
 
 static int method_list_links(sd_bus_message *message, void *userdata, sd_bus_error *error) {
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
index 5cd7f16761ed014e6b96ad4eeafe7c93d4274c5d..e145c975582298d0310f16f0c53ea965ec2b7994 100644 (file)
@@ -1,11 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
-
-#include "bus-object.h"
-
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 extern const BusObjectImplementation manager_object;
 
index 0169dcfea00bc5077a55859c9e3babe930d9b4a5..d64c4dd8d81dbda54fbed62cff1facf71c2f3f3d 100644 (file)
@@ -2,10 +2,12 @@
 
 #include <unistd.h>
 
+#include "sd-event.h"
 #include "sd-varlink.h"
 
 #include "bus-polkit.h"
 #include "fd-util.h"
+#include "hashmap.h"
 #include "json-util.h"
 #include "lldp-rx-internal.h"
 #include "network-util.h"
index 31afc43335c88d6c647d4451d29fa52c5b8740f1..992e48839e68777d7d766fd12b8690d2d7dbf586 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 int manager_connect_varlink(Manager *m);
 void manager_varlink_done(Manager *m);
index 7d29298d8355933e692b94c0cafd02db424b0d2a..3af3eda63076be57cd0d4bc326f766fa81bf8d37 100644 (file)
@@ -1,50 +1,39 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/fib_rules.h>
-#include <linux/if.h>
-#include <linux/nexthop.h>
+#include <linux/filter.h>
 #include <linux/nl80211.h>
-#include <netinet/in.h>
 #include <sys/socket.h>
-#include <unistd.h>
 
+#include "sd-bus.h"
+#include "sd-event.h"
 #include "sd-netlink.h"
+#include "sd-resolve.h"
 
 #include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-locator.h"
 #include "bus-log-control-api.h"
-#include "bus-polkit.h"
+#include "bus-object.h"
 #include "bus-util.h"
 #include "capability-util.h"
 #include "common-signal.h"
-#include "conf-parser.h"
-#include "constants.h"
 #include "daemon-util.h"
 #include "device-private.h"
 #include "device-util.h"
-#include "dns-domain.h"
 #include "env-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
-#include "fileio.h"
 #include "firewall-util.h"
-#include "fs-util.h"
 #include "initrd-util.h"
-#include "local-addresses.h"
 #include "mount-util.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "networkd-address.h"
 #include "networkd-address-label.h"
 #include "networkd-address-pool.h"
-#include "networkd-dhcp-server-bus.h"
-#include "networkd-dhcp6.h"
-#include "networkd-link-bus.h"
 #include "networkd-manager.h"
 #include "networkd-manager-bus.h"
 #include "networkd-manager-varlink.h"
 #include "networkd-neighbor.h"
-#include "networkd-network-bus.h"
 #include "networkd-nexthop.h"
 #include "networkd-queue.h"
 #include "networkd-route.h"
 #include "networkd-wifi.h"
 #include "networkd-wiphy.h"
 #include "ordered-set.h"
-#include "path-lookup.h"
-#include "path-util.h"
 #include "qdisc.h"
-#include "selinux-util.h"
 #include "set.h"
-#include "signal-util.h"
+#include "stat-util.h"
+#include "string-util.h"
 #include "strv.h"
-#include "sysctl-util.h"
 #include "tclass.h"
 #include "tuntap.h"
 #include "udev-util.h"
index 59e07748c64fe924b3e5450236afab6c93ab2a93..db669d170d291021ad4abcf373749849b82c27ba 100644 (file)
@@ -1,23 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
-#include "sd-device.h"
-#include "sd-event.h"
-#include "sd-id128.h"
-#include "sd-netlink.h"
-#include "sd-resolve.h"
-#include "sd-varlink.h"
-
-#include "dhcp-duid-internal.h"
-#include "firewall-util.h"
-#include "hashmap.h"
-#include "networkd-link.h"
+#include "networkd-forward.h"
 #include "networkd-network.h"
-#include "networkd-sysctl.h"
-#include "ordered-set.h"
-#include "set.h"
-#include "time-util.h"
 
 typedef enum ManagerState {
         MANAGER_RUNNING,
@@ -28,7 +13,7 @@ typedef enum ManagerState {
         _MANAGER_STATE_INVALID = -EINVAL,
 } ManagerState;
 
-struct Manager {
+typedef struct Manager {
         sd_netlink *rtnl;
         /* lazy initialized */
         sd_netlink *genl;
@@ -140,7 +125,7 @@ struct Manager {
         struct bpf_link *sysctl_link;
         int cgroup_fd;
 #endif
-};
+} Manager;
 
 int manager_new(Manager **ret, bool test_mode);
 Manager* manager_free(Manager *m);
index 4b988dcaf49f21c0de0c059c7960791fd5298019..2a002e3faad7b2db8780b609f06ac57bdd93a898 100644 (file)
@@ -3,13 +3,14 @@
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
 
-#include <arpa/inet.h>
-#include <linux/if.h>
 #include <linux/if_arp.h>
+#include <linux/rtnetlink.h>
 #include <netinet/icmp6.h>
 
 #include "sd-ndisc.h"
 
+#include "conf-parser.h"
+#include "errno-util.h"
 #include "event-util.h"
 #include "missing_network.h"
 #include "ndisc-router-internal.h"
 #include "networkd-route.h"
 #include "networkd-state-file.h"
 #include "networkd-sysctl.h"
-#include "sort-util.h"
+#include "ordered-set.h"
+#include "set.h"
+#include "siphash24.h"
+#include "socket-util.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 
 static int ndisc_drop_outdated(Link *link, const struct in6_addr *router, usec_t timestamp_usec);
 
+char* ndisc_dnssl_domain(const NDiscDNSSL *n) {
+        return ((char*) n) + ALIGN(sizeof(NDiscDNSSL));
+}
+
 bool link_ndisc_enabled(Link *link) {
         assert(link);
 
@@ -1850,11 +1858,11 @@ static int ndisc_router_process_rdnss(Link *link, sd_ndisc_router *rt, bool zero
 }
 
 static void ndisc_dnssl_hash_func(const NDiscDNSSL *x, struct siphash *state) {
-        siphash24_compress_string(NDISC_DNSSL_DOMAIN(x), state);
+        siphash24_compress_string(ndisc_dnssl_domain(x), state);
 }
 
 static int ndisc_dnssl_compare_func(const NDiscDNSSL *a, const NDiscDNSSL *b) {
-        return strcmp(NDISC_DNSSL_DOMAIN(a), NDISC_DNSSL_DOMAIN(b));
+        return strcmp(ndisc_dnssl_domain(a), ndisc_dnssl_domain(b));
 }
 
 DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR(
@@ -1901,7 +1909,7 @@ static int ndisc_router_process_dnssl(Link *link, sd_ndisc_router *rt, bool zero
                 if (!s)
                         return log_oom();
 
-                strcpy(NDISC_DNSSL_DOMAIN(s), *j);
+                strcpy(ndisc_dnssl_domain(s), *j);
 
                 if (lifetime_usec == 0) {
                         /* The entry is outdated. */
index bc5d277c5b154d3a42051ab4cc42dd82b9ddce38..1d73b9a3134ad551b38546633f3873843940a56f 100644 (file)
@@ -1,13 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-#include "dns-resolver-internal.h"
-#include "time-util.h"
+#include <netinet/in.h>
 
-typedef struct Address Address;
-typedef struct Link Link;
-typedef struct Network Network;
+#include "dns-resolver-internal.h"
+#include "networkd-forward.h"
 
 typedef enum IPv6AcceptRAStartDHCP6Client {
         IPV6_ACCEPT_RA_START_DHCP6_CLIENT_NO,
@@ -56,9 +53,7 @@ typedef struct NDiscDNR {
         sd_dns_resolver resolver;
 } NDiscDNR;
 
-static inline char* NDISC_DNSSL_DOMAIN(const NDiscDNSSL *n) {
-        return ((char*) n) + ALIGN(sizeof(NDiscDNSSL));
-}
+char* ndisc_dnssl_domain(const NDiscDNSSL *n);
 
 bool link_ndisc_enabled(Link *link);
 
index b3292d6d18a6644f42b79c5e818ddb2c89aa23e6..3bcd0e1324cc3e8c0519978858594b2d2245280a 100644 (file)
@@ -1,6 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
+#include "conf-parser.h"
+#include "errno-util.h"
 #include "hashmap.h"
 #include "netlink-util.h"
 #include "networkd-link.h"
@@ -8,7 +12,11 @@
 #include "networkd-neighbor.h"
 #include "networkd-network.h"
 #include "networkd-queue.h"
+#include "ordered-set.h"
 #include "set.h"
+#include "siphash24.h"
+#include "socket-util.h"
+#include "string-util.h"
 
 static Neighbor* neighbor_detach_impl(Neighbor *neighbor) {
         assert(neighbor);
index 5dd43a98a0085a01c7318c8f5909dceb8b0b1da8..088736fa5ffb64c028980bb3d351a0f9232c0de9 100644 (file)
@@ -1,19 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
 #include "ether-addr-util.h"
 #include "in-addr-util.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
 
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
-
 typedef struct Neighbor {
         Network *network;
         Link *link;
index f153a929e33e3f7f51b9afc1adfd9ec82db10760..7ba21bbdda60832f4d1ab10d581a214c418adc1e 100644 (file)
@@ -1,12 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "escape.h"
+#include "sd-netlink.h"
+
+#include "missing_network.h"
 #include "netlink-util.h"
 #include "networkd-address.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-netlabel.h"
-#include "networkd-network.h"
 
 static int netlabel_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
         int r;
index f18ad5aa14f53c90f4967a0b1f21c1a940c8d203..76628894ed259c17ef3b58df4f886310f9dac2a5 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Address Address;
+#include "networkd-forward.h"
 
 void address_add_netlabel(const Address *address);
 void address_del_netlabel(const Address *address);
index 5c61cbf8873b71bd51d2b02f59ae8066d0507d29..6e9f995aa9aa956ba5950dd31844068969d65367 100644 (file)
@@ -1,11 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-bus.h"
+
 #include "alloc-util.h"
+#include "bus-object.h"
 #include "ether-addr-util.h"
 #include "networkd-manager.h"
 #include "networkd-network-bus.h"
-#include "path-util.h"
-#include "string-util.h"
+#include "set.h"
 #include "strv.h"
 
 static int property_get_hw_addrs(
index 68ed951425b917d9a7cbe93eb06d3398a728c05a..c7889b54dcadf45ec5c5d50f6d99edf9a392a51f 100644 (file)
@@ -1,11 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-bus.h"
-
-#include "bus-object.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 extern const BusObjectImplementation network_object;
 
index aa99829638c035973042f79835ae456e1a2004c6..54d2783c8042083d04ac0393ee56a0e3f1c51967 100644 (file)
@@ -8,6 +8,9 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
 #include <netinet/icmp6.h>
 #include <stddef.h>
 
+#include "sd-dhcp-lease.h"
+
+#include "condition.h"
 #include "conf-parser.h"
 #include "in-addr-prefix-util.h"
 #include "net-condition.h"
@@ -30,7 +33,6 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
 #include "networkd-ipv6ll.h"
 #include "networkd-lldp-tx.h"
 #include "networkd-ndisc.h"
-#include "networkd-netlabel.h"
 #include "networkd-network.h"
 #include "networkd-neighbor.h"
 #include "networkd-nexthop.h"
@@ -38,11 +40,9 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
 #include "networkd-radv.h"
 #include "networkd-route.h"
 #include "networkd-routing-policy-rule.h"
-#include "networkd-sriov.h"
 #include "qdisc.h"
 #include "socket-util.h"
 #include "tclass.h"
-#include "vlan-util.h"
 
 #include "cake.h"
 #include "codel.h"
@@ -54,8 +54,6 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
 #include "gred.h"
 #include "hhf.h"
 #include "htb.h"
-#include "mq.h"
-#include "multiq.h"
 #include "pie.h"
 #include "qfq.h"
 #include "netem.h"
index db21d51b2f47826773a91a0d5f8ffa6341f6556b..c9805509cc0dfe69d52becb98d0f5a3fe05d154e 100644 (file)
@@ -1,19 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/netdevice.h>
-#include <net/if.h>
-#include <netinet/in.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "condition.h"
 #include "conf-files.h"
 #include "conf-parser.h"
-#include "dns-domain.h"
-#include "fd-util.h"
-#include "hostname-util.h"
 #include "in-addr-util.h"
 #include "net-condition.h"
 #include "netdev/macvlan.h"
+#include "netif-sriov.h"
 #include "network-util.h"
 #include "networkd-address.h"
 #include "networkd-address-label.h"
@@ -30,9 +26,8 @@
 #include "networkd-radv.h"
 #include "networkd-route.h"
 #include "networkd-routing-policy-rule.h"
-#include "networkd-sriov.h"
+#include "ordered-set.h"
 #include "parse-util.h"
-#include "path-lookup.h"
 #include "qdisc.h"
 #include "radv-internal.h"
 #include "set.h"
index c783da5f47135a662b7112b16c4b5108779f4179..4ead5028f9821afba231e52b576f8ff5bd0a7cf6 100644 (file)
@@ -1,35 +1,24 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <linux/nl80211.h>
-
-#include "sd-bus.h"
-#include "sd-device.h"
+#include "sd-dhcp-lease.h"
 #include "sd-lldp-tx.h"
 
 #include "bridge.h"
-#include "condition.h"
-#include "conf-parser.h"
 #include "firewall-util.h"
-#include "hashmap.h"
 #include "ipoib.h"
 #include "net-condition.h"
-#include "netdev.h"
-#include "networkd-address.h"
-#include "networkd-bridge-vlan.h"
+#include "network-util.h"
 #include "networkd-dhcp-common.h"
 #include "networkd-dhcp4.h"
 #include "networkd-dhcp6.h"
 #include "networkd-dns.h"
-#include "networkd-ipv6ll.h"
+#include "networkd-forward.h"
+#include "networkd-link.h"
 #include "networkd-lldp-rx.h"
 #include "networkd-ndisc.h"
 #include "networkd-radv.h"
 #include "networkd-sysctl.h"
-#include "networkd-util.h"
-#include "ordered-set.h"
-#include "resolve-util.h"
-#include "socket-netlink.h"
 
 typedef enum KeepConfiguration {
         KEEP_CONFIGURATION_NO               = 0,
@@ -53,15 +42,13 @@ typedef enum ActivationPolicy {
         _ACTIVATION_POLICY_INVALID = -EINVAL,
 } ActivationPolicy;
 
-typedef struct Manager Manager;
-
 typedef struct NetworkDHCPServerEmitAddress {
         bool emit;
         struct in_addr *addresses;
         size_t n_addresses;
 } NetworkDHCPServerEmitAddress;
 
-struct Network {
+typedef struct Network {
         Manager *manager;
 
         unsigned n_ref;
@@ -419,7 +406,7 @@ struct Network {
 
         /* NTP */
         char **ntp;
-};
+} Network;
 
 Network *network_ref(Network *network);
 Network *network_unref(Network *network);
index 770ded77fe701f375cfde05b20d6f9d029b6fa9f..7d221849b479c8ff735a4e5fc773be6b62102ea3 100644 (file)
@@ -4,8 +4,14 @@
 
 #include <linux/nexthop.h>
 #include <net/if.h>
+#include <stdio.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
+#include "conf-parser.h"
+#include "errno-util.h"
+#include "extract-word.h"
 #include "netlink-util.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-queue.h"
 #include "networkd-route.h"
 #include "networkd-route-util.h"
+#include "ordered-set.h"
 #include "parse-util.h"
 #include "set.h"
-#include "stdio-util.h"
+#include "siphash24.h"
 #include "string-util.h"
 
 static void nexthop_detach_from_group_members(NextHop *nexthop) {
index 8e345c6d53e269c5ce4b24b6de1143c5079f9227..3eee6680b26eccf32a8058ffe0535cf87b18e1da 100644 (file)
@@ -4,20 +4,10 @@
 
 #pragma once
 
-#include <inttypes.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
-#include "hashmap.h"
 #include "in-addr-util.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
 
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
-typedef struct NextHop NextHop;
-typedef struct Request Request;
 typedef int (*nexthop_netlink_handler_t)(
                 sd_netlink *rtnl,
                 sd_netlink_message *m,
@@ -25,7 +15,7 @@ typedef int (*nexthop_netlink_handler_t)(
                 Link *link,
                 NextHop *nexthop);
 
-struct NextHop {
+typedef struct NextHop {
         Network *network;
         Manager *manager;
         ConfigSection *section;
@@ -53,7 +43,7 @@ struct NextHop {
         /* For managing routes and nexthops that depend on this nexthop. */
         Set *nexthops;
         Set *routes;
-};
+} NextHop;
 
 void log_nexthop_debug(const NextHop *nexthop, const char *str, Manager *manager);
 
index 41db2f43715939437394ac624d6fa281d62e4578..f0808211b0c9b52096117755db96361224ccc41e 100644 (file)
@@ -2,9 +2,11 @@
 
 #include "alloc-util.h"
 #include "dns-domain.h"
+#include "extract-word.h"
+#include "networkd-link.h"
 #include "networkd-network.h"
 #include "networkd-ntp.h"
-#include "parse-util.h"
+#include "string-util.h"
 #include "strv.h"
 
 /* Let's assume that anything above this number is a user misconfiguration. */
index 44e7678486bcb1d4f218d485cc2d7370428e5d33..1ee8c9d36d15e59f02ba6acfdf71e1dd7ea1a723 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
-#include "networkd-util.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 bool link_get_use_ntp(Link *link, NetworkConfigSource proto);
 
index 361aa7eec2ec3ff006aab4291d37874b01e2f9ab..bc2e7095fa8bbd40c8966ba381c8671afb2d702f 100644 (file)
@@ -1,10 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-netlink.h"
+
+#include "alloc-util.h"
 #include "netdev.h"
 #include "netlink-util.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-queue.h"
+#include "ordered-set.h"
+#include "siphash24.h"
 #include "string-table.h"
 
 #define REPLY_CALLBACK_COUNT_THRESHOLD 128
index 00a514266d9f2711fa9b190b275bd7c5427b7dcd..16db5e3ba578bd2a0ecd783d523291aa535291f3 100644 (file)
@@ -1,16 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-netlink.h"
-
-#include "alloc-util.h"
-#include "hash-funcs.h"
 #include "netif-sriov.h"
-
-typedef struct Link Link;
-typedef struct NetDev NetDev;
-typedef struct Manager Manager;
-typedef struct Request Request;
+#include "networkd-forward.h"
 
 typedef int (*request_process_func_t)(Request *req, Link *link, void *userdata);
 typedef int (*request_netlink_handler_t)(sd_netlink *nl, sd_netlink_message *m, Request *req, Link *link, void *userdata);
@@ -59,7 +51,7 @@ typedef enum RequestType {
         _REQUEST_TYPE_INVALID = -EINVAL,
 } RequestType;
 
-struct Request {
+typedef struct Request {
         unsigned n_ref;
 
         Manager *manager; /* must be non-NULL */
@@ -89,7 +81,7 @@ struct Request {
         request_netlink_handler_t netlink_handler;
 
         bool waiting_reply;
-};
+} Request;
 
 Request *request_ref(Request *req);
 Request *request_unref(Request *req);
index b3fc77fa0fcf9f986ea58f7511ddc7f9197f1645..36bad5ad50ea478eeefb6995904b57e9d387226a 100644 (file)
@@ -3,10 +3,13 @@
   Copyright © 2017 Intel Corporation. All rights reserved.
 ***/
 
-#include <arpa/inet.h>
 #include <netinet/icmp6.h>
 
+#include "sd-radv.h"
+
+#include "conf-parser.h"
 #include "dns-domain.h"
+#include "extract-word.h"
 #include "ndisc-router-internal.h"
 #include "networkd-address.h"
 #include "networkd-address-generation.h"
 #include "networkd-queue.h"
 #include "networkd-radv.h"
 #include "networkd-route-util.h"
+#include "ordered-set.h"
 #include "parse-util.h"
 #include "radv-internal.h"
+#include "set.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
index f3367174452469174555fad20d2c383a1d364c69..3c5fbb185ebef8ea025148163372ae706cc62a5f 100644 (file)
@@ -5,19 +5,8 @@
   Copyright © 2017 Intel Corporation. All rights reserved.
 ***/
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-#include "sd-radv.h"
-
-#include "conf-parser.h"
-#include "in-addr-util.h"
 #include "ndisc-option.h"
-#include "networkd-util.h"
-
-typedef struct Address Address;
-typedef struct Link Link;
-typedef struct Network Network;
+#include "networkd-forward.h"
 
 typedef enum RADVPrefixDelegation {
         RADV_PREFIX_DELEGATION_NONE   = 0,
index 480707fc2aed52d01435a4b09d4b9559ceaef480..89222a2370154434ce1bdcaa2c0854101cbc8a41 100644 (file)
@@ -1,10 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
+#include "conf-parser.h"
+#include "log.h"
 #include "netlink-util.h"
 #include "networkd-route.h"
 #include "networkd-route-metric.h"
 #include "parse-util.h"
+#include "siphash24.h"
 #include "string-util.h"
 
 void route_metric_done(RouteMetric *metric) {
index c85eef58b3479c539e2337d61a8a7807433df250..52a4dc10a8f2c32a247451f7b39e771c2ee1bc1a 100644 (file)
@@ -1,13 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
-#include "hash-funcs.h"
+#include "networkd-forward.h"
 
 typedef struct RouteMetric {
         size_t n_metrics; /* maximum metric attr type with non-zero value */
index 9482b25bb8e1b84ea699ac0bab6083a90887a000..7b4384b523910365f6702276c3a6a9e25cf9f1ff 100644 (file)
@@ -1,8 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/nexthop.h>
+#include <stdio.h>
+
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
+#include "conf-parser.h"
 #include "extract-word.h"
 #include "netlink-util.h"
 #include "networkd-manager.h"
 #include "networkd-route.h"
 #include "networkd-route-nexthop.h"
 #include "networkd-route-util.h"
+#include "ordered-set.h"
 #include "parse-util.h"
+#include "set.h"
+#include "siphash24.h"
+#include "socket-util.h"
 #include "string-util.h"
 
 void route_detach_from_nexthop(Route *route) {
index f3f1d7e7a006967b4a713f2fd23eba17b4783b0e..7ece89984825d5ee46bba77bc5c802200d35039d 100644 (file)
@@ -1,19 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
 #include "in-addr-util.h"
-#include "macro.h"
-#include "siphash24.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Route Route;
+#include "networkd-forward.h"
 
 typedef struct RouteNextHop {
         int family; /* used in RTA_VIA (IPv4 only) */
index 2512abf15275e20413725f1321c982864911f029..ee5b900d067a1daa5496312f2a65ae01850835a0 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "alloc-util.h"
 #include "bitfield.h"
+#include "extract-word.h"
 #include "logarithm.h"
 #include "networkd-address.h"
 #include "networkd-link.h"
@@ -12,9 +13,9 @@
 #include "networkd-route.h"
 #include "networkd-route-util.h"
 #include "parse-util.h"
+#include "set.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "strv.h"
 #include "sysctl-util.h"
 
 #define ROUTES_DEFAULT_MAX_PER_FAMILY 4096
index dfa3bf3c6f3295b42717a82c09edc9b94f8cc0a4..1c037f7a073c72870a9f34b116cb5b50fb79c7d9 100644 (file)
@@ -1,16 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-#include "conf-parser.h"
-#include "in-addr-util.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Address Address;
-typedef struct Route Route;
+#include "networkd-forward.h"
 
 unsigned routes_max(void);
 
index 665155e1ba00fa52e307862940682cd085c00873..52c2cb4fc1b2354d09f837a54c41b1d1afb750b5 100644 (file)
@@ -1,10 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <linux/ipv6_route.h>
-#include <linux/nexthop.h>
+#include <net/if.h>
+#include <stdio.h>
+
+#include "sd-ndisc-protocol.h"
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
+#include "conf-parser.h"
+#include "errno-util.h"
 #include "event-util.h"
 #include "netlink-util.h"
 #include "networkd-address.h"
 #include "networkd-queue.h"
 #include "networkd-route.h"
 #include "networkd-route-util.h"
+#include "ordered-set.h"
 #include "parse-util.h"
+#include "set.h"
+#include "siphash24.h"
 #include "string-util.h"
-#include "strv.h"
 #include "vrf.h"
 #include "wireguard.h"
 
index 4ce81342a788d6621f52b28cd58b84e501b63be4..8470c5651cbaa0106537e54fc3e9d322f1d9147b 100644 (file)
@@ -1,24 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
 #include "in-addr-util.h"
-#include "networkd-link.h"
+#include "networkd-forward.h"
 #include "networkd-route-metric.h"
 #include "networkd-route-nexthop.h"
 #include "networkd-util.h"
 
-typedef struct Manager Manager;
-typedef struct Network Network;
-typedef struct Request Request;
-typedef struct Route Route;
-typedef struct Wireguard Wireguard;
-
 typedef int (*route_netlink_handler_t)(
                 sd_netlink *rtnl,
                 sd_netlink_message *m,
@@ -26,7 +14,7 @@ typedef int (*route_netlink_handler_t)(
                 Link *link,
                 Route *route);
 
-struct Route {
+typedef struct Route {
         Manager *manager;
         Network *network;
         Wireguard *wireguard;
@@ -79,7 +67,7 @@ struct Route {
         bool pref_set:1;
         bool gateway_from_dhcp_or_ra:1;
         int gateway_onlink;
-};
+} Route;
 
 void log_route_debug(const Route *route, const char *str, Manager *manager);
 
index 819cb69f338d81fae82d7bf1e9935392ecf271d5..b47718e4715314a345c6863a5a391800fc8f080c 100644 (file)
@@ -1,15 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/fib_rules.h>
-#include <net/if.h>
 
-#include "af-list.h"
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "conf-parser.h"
-#include "fileio.h"
-#include "format-util.h"
+#include "errno-util.h"
 #include "hashmap.h"
-#include "ip-protocol-list.h"
 #include "netlink-util.h"
 #include "network-util.h"
 #include "networkd-manager.h"
 #include "networkd-route-util.h"
 #include "networkd-routing-policy-rule.h"
 #include "networkd-util.h"
+#include "ordered-set.h"
 #include "parse-util.h"
-#include "socket-util.h"
+#include "set.h"
+#include "siphash24.h"
 #include "string-table.h"
 #include "string-util.h"
-#include "strv.h"
 #include "user-util.h"
 
 static const char *const fr_act_type_table[__FR_ACT_MAX] = {
index 61609930dba89fb399029cd2190844ba485d4560..378455f0a43ab6a1ee9d475eed579569bdf25365 100644 (file)
@@ -1,18 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
 #include <linux/fib_rules.h>
-#include <stdbool.h>
 
-#include "conf-parser.h"
 #include "in-addr-prefix-util.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
 
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
-
 typedef struct RoutingPolicyRule {
         Manager *manager;
         Network *network;
index 8e29bc518a149195f7175150494c09d9f3b80386..93ae377679c87deabe33c1fa91be65752341b8d4 100644 (file)
@@ -3,8 +3,10 @@
 #include "af-list.h"
 #include "alloc-util.h"
 #include "daemon-util.h"
+#include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
+#include "hashmap.h"
 #include "iovec-util.h"
 #include "json-util.h"
 #include "memfd-util.h"
@@ -15,6 +17,7 @@
 #include "networkd-nexthop.h"
 #include "networkd-route.h"
 #include "networkd-serialize.h"
+#include "string-util.h"
 
 int manager_serialize(Manager *manager) {
         _cleanup_(sd_json_variant_unrefp) sd_json_variant *v = NULL, *array = NULL;
index f04378fa5d4d5e37defff202017d2df27bac9f37..f95e76039b9a76977621642e7da634d8cff3dab7 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 int manager_serialize(Manager *manager);
 int manager_set_serialization_fd(Manager *manager, int fd, const char *name);
index 2af553cba8c37ff359266528d6c2375504c45377..0ab7fb14d33b330c8cd68b22473b249a35080d21 100644 (file)
@@ -1,11 +1,11 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <linux/if_arp.h>
-#include <linux/if_bridge.h>
 #include <linux/ipv6.h>
 #include <netinet/in.h>
 
+#include "sd-netlink.h"
+
 #include "device-private.h"
 #include "missing_network.h"
 #include "netif-util.h"
 #include "networkd-setlink.h"
 #include "networkd-sriov.h"
 #include "networkd-wiphy.h"
+#include "ordered-set.h"
+#include "set.h"
+#include "socket-util.h"
+#include "string-util.h"
 
 static int get_link_default_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
         return link_getlink_handler_internal(rtnl, m, link, "Failed to sync link information");
index df617f2167d4b0ce1082f02529e1f9f94851c99d..41ebe52f0d410bafca6a6892e163593d7d03a2ec 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-#include <stdbool.h>
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 int link_request_to_set_addrgen_mode(Link *link);
 int link_request_to_set_bond(Link *link);
index cc94673d76755282b1199b47f8749abe8add87f0..ade6c7433174673c72e3fe46242df6ef7879d977 100644 (file)
@@ -1,12 +1,10 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <errno.h>
-
 #include "sd-event.h"
 #include "sd-netlink.h"
 
+#include "hashmap.h"
 #include "networkd-link.h"
-#include "networkd-link-bus.h"
 #include "networkd-manager.h"
 #include "networkd-speed-meter.h"
 
index 4dd024b62a31b709293caed11ad40e3ed1750148..f7ef5a45697ddb10da455c8233e2a08a97186d76 100644 (file)
@@ -1,12 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "networkd-forward.h"
+
 /* Default interval is 10sec. The speed meter periodically make networkd
  * to be woke up. So, too small interval value is not desired.
  * We set the minimum value 100msec = 0.1sec. */
 #define SPEED_METER_DEFAULT_TIME_INTERVAL (10 * USEC_PER_SEC)
 #define SPEED_METER_MINIMUM_TIME_INTERVAL (100 * USEC_PER_MSEC)
 
-typedef struct Manager Manager;
-
 int manager_start_speed_meter(Manager *m);
index cb974f881d3c64ef18ff10fbb900824c2e891d95..c45e4487183af1f5f83801f1da83f7bd158daf6a 100644 (file)
@@ -1,13 +1,17 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
-#include "device-enumerator-private.h"
+#include "sd-netlink.h"
+
 #include "device-util.h"
-#include "fd-util.h"
+#include "errno-util.h"
+#include "hashmap.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-queue.h"
 #include "networkd-sriov.h"
+#include "set.h"
+#include "string-util.h"
 
 static int sr_iov_handler(sd_netlink *rtnl, sd_netlink_message *m, Request *req, Link *link, SRIOV *sr_iov) {
         int r;
index 0d4276e099359756aaa81636fe6df80162a41ba7..e8a97f3317366ca537db11fb7f426b9a75196de7 100644 (file)
@@ -2,9 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "netif-sriov.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 int link_request_sr_iov_vfs(Link *link);
 
index 52836fdf4c9b71ee9c83b1068c098af7442c908b..288390645ea352778dd486babddf735b463868c5 100644 (file)
@@ -1,11 +1,15 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
+#include <net/if.h>
 #include <netinet/in.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "sd-dhcp6-lease.h"
 
 #include "alloc-util.h"
-#include "dns-domain.h"
 #include "dns-resolver-internal.h"
+#include "errno-util.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -20,6 +24,7 @@
 #include "networkd-state-file.h"
 #include "ordered-set.h"
 #include "set.h"
+#include "string-util.h"
 #include "strv.h"
 #include "tmpfile-util.h"
 
@@ -315,7 +320,7 @@ static int link_put_domains(Link *link, bool is_route, OrderedSet **s) {
                 NDiscDNSSL *a;
 
                 SET_FOREACH(a, link->ndisc_dnssl) {
-                        r = ordered_set_put_strdup(s, NDISC_DNSSL_DOMAIN(a));
+                        r = ordered_set_put_strdup(s, ndisc_dnssl_domain(a));
                         if (r < 0)
                                 return r;
                 }
@@ -671,7 +676,7 @@ static void link_save_domains(Link *link, FILE *f, OrderedSet *static_domains, U
                 NDiscDNSSL *dd;
 
                 SET_FOREACH(dd, link->ndisc_dnssl)
-                        fputs_with_separator(f, NDISC_DNSSL_DOMAIN(dd), NULL, &space);
+                        fputs_with_separator(f, ndisc_dnssl_domain(dd), NULL, &space);
         }
 }
 
index c45bd5308323acb7814c8321b49587a1daa4c72c..8991413dab31aa69281872f31c04f4bc22e5c2ff 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-typedef struct Link Link;
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 void link_dirty(Link *link);
 void link_clean(Link *link);
index 1f30669e2ed679545d49ea34eafafdeee639446d..b37f24c5bc1a44357eb76367b70c192816a7c83c 100644 (file)
@@ -1,18 +1,18 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <linux/if_arp.h>
-#include <netinet/in.h>
 
 #include "sd-messages.h"
 
 #include "af-list.h"
+#include "conf-parser.h"
 #include "alloc-util.h"
 #include "cgroup-util.h"
+#include "errno-util.h"
 #include "event-util.h"
 #include "fd-util.h"
 #include "format-util.h"
-#include "missing_network.h"
+#include "hashmap.h"
 #include "networkd-link.h"
 #include "networkd-lldp-tx.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "networkd-sysctl.h"
 #include "path-util.h"
+#include "set.h"
 #include "socket-util.h"
 #include "string-table.h"
+#include "string-util.h"
 #include "sysctl-util.h"
 
 #if HAVE_VMLINUX_H
index 2a1f1ae24848304c4f80ea30e520a399a3c107f8..dac7a72324f63812d1f8d96c466ac6b8b4bcd28f 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <stdbool.h>
-
-#include "conf-parser.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 typedef enum IPv6PrivacyExtensions {
         /* These values map to the kernel's /proc/sys/net/ipv6/conf/xxx/use_tempaddr values. Do not reorder! */
index 53115786c7d30e31f3dbe0598a0769741d4a67d8..4e1a12d8d3bc97b6c8bb6debb2a29f4d38c9254f 100644 (file)
@@ -1,8 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <linux/rtnetlink.h>
+
 #include "alloc-util.h"
 #include "bitfield.h"
-#include "condition.h"
 #include "conf-parser.h"
 #include "escape.h"
 #include "logarithm.h"
index 994b70e4f254bc3fd7b88363c1aaad70f24338fe..22a04269d3ab7eeb30b56fec830a8f420d87b28f 100644 (file)
@@ -1,17 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-dhcp-lease.h"
-#include "sd-netlink.h"
-
-#include "conf-parser.h"
-#include "hashmap.h"
-#include "log.h"
-#include "macro.h"
 #include "network-util.h"
-#include "string-util.h"
-
-typedef struct Link Link;
+#include "networkd-forward.h"
+#include "time-util.h"
 
 typedef enum NetworkConfigSource {
         NETWORK_CONFIG_SOURCE_FOREIGN, /* configured by kernel */
index d1b35df29952dc4b211736696f7a1038219625bf..e0b4f8b50683424662437a62d2b2c107dc192c84 100644 (file)
@@ -3,13 +3,15 @@
 #include <linux/nl80211.h>
 #include <net/ethernet.h>
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "ether-addr-util.h"
-#include "netlink-util.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-wifi.h"
 #include "networkd-wiphy.h"
+#include "set.h"
 #include "string-util.h"
 #include "wifi-util.h"
 
index 2ef0d302e782d14c91bf9e399c7df60d2147ffe9..c9a85564187d0cd00a7af2d19c289296c9207e28 100644 (file)
@@ -1,10 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-netlink.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 int manager_genl_process_nl80211_config(sd_netlink *genl, sd_netlink_message *message, Manager *manager);
 int manager_genl_process_nl80211_mlme(sd_netlink *genl, sd_netlink_message *message, Manager *manager);
index 33f7fe680f7b42ad96735d29301e8005be77117f..2e16c130407fb395148a65bda2932f900f440fda 100644 (file)
@@ -3,13 +3,17 @@
 #include <linux/nl80211.h>
 #include <net/if_arp.h>
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "device-private.h"
 #include "device-util.h"
+#include "errno-util.h"
+#include "hashmap.h"
 #include "networkd-manager.h"
 #include "networkd-wiphy.h"
-#include "parse-util.h"
 #include "path-util.h"
+#include "string-util.h"
 #include "udev-util.h"
 #include "wifi-util.h"
 
index 9a42b26be6fae28b67b317bfcb69999c0f00b1ec..67caa824faa75075841054a7019d954b307d327b 100644 (file)
@@ -1,15 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <inttypes.h>
-
-#include "sd-device.h"
-#include "sd-netlink.h"
-
-#include "macro.h"
-
-typedef struct Link Link;
-typedef struct Manager Manager;
+#include "networkd-forward.h"
 
 /* The following values are different from the ones defined in linux/rfkill.h. */
 typedef enum RFKillState {
index d39cb19ed2d7a7d28f718d7f73a165e1e153e10e..dda1a4cf267b042ecad6a3051f93921f179dcbb5 100644 (file)
@@ -1,16 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <netinet/in.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 
-#include "sd-daemon.h"
 #include "sd-event.h"
 
 #include "bus-log-control-api.h"
+#include "bus-object.h"
 #include "capability-util.h"
 #include "daemon-util.h"
-#include "firewall-util.h"
 #include "main-func.h"
 #include "mkdir-label.h"
 #include "networkd-conf.h"
@@ -18,7 +15,6 @@
 #include "networkd-manager-bus.h"
 #include "networkd-serialize.h"
 #include "service-util.h"
-#include "signal-util.h"
 #include "strv.h"
 #include "user-util.h"
 
index 704e527b46a1f29245198ae6c67cf71329d653d3..8607981f9408d81028908397dddc2f2bd7d72c7e 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
+#include "sd-netlink.h"
+
 #include "cake.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "qdisc.h"
 #include "string-table.h"
index 5ca6dc6470fccd9cc47ab2921a82c4803363041a..b8aea70a160813b9c93597004666925c23117890 100644 (file)
@@ -4,7 +4,6 @@
 
 #include <linux/pkt_sched.h>
 
-#include "conf-parser.h"
 #include "qdisc.h"
 
 typedef enum CakeCompensationMode {
index 2bba46f2e9fb93da6b32c55946e7cb5b3fb56e39..482a813bb1e36be68ec9684e787bf52daa06a69c 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
+#include "sd-netlink.h"
+
 #include "codel.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index 4fe52831a08d848dfac4623837dec3324481169c..98564c5640a096bc1a9a98026e48bfc3e577d3ea 100644 (file)
@@ -2,9 +2,7 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
 #include "qdisc.h"
-#include "time-util.h"
 
 typedef struct ControlledDelay {
         QDisc meta;
index 5d754101de2aff20f1bc66b45a033147259101f0..1aae00722bfebeb73a7a5835d89fe45bffb4cc50 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "drr.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index 4719bf6c4f98bc15ea7b9e4d24be33b5d7414e84..54c6c7cafe10b396164f8d3a45296e2400e928ba 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
+#include "forward.h"
 #include "qdisc.h"
 #include "tclass.h"
 
index 4af750834cb30fafb14dd3c12b1a9e7fcf150bcd..8f12ee172e10706af895fb53bd95426a33aa585f 100644 (file)
@@ -2,16 +2,15 @@
 
 #include <linux/pkt_sched.h>
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
-#include "conf-parser.h"
 #include "ets.h"
 #include "extract-word.h"
-#include "memory-util.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "qdisc.h"
 #include "string-util.h"
-#include "tc-util.h"
 
 static int enhanced_transmission_selection_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
         EnhancedTransmissionSelection *ets;
index b6dd42811c22a4d1dfe22f1587267c5bfb4957bb..6aa06ed15c040a43b518c2c590d0a0c8d7e02ca1 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <linux/pkt_sched.h>
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct EnhancedTransmissionSelection {
index 9638be8ff9caa1d3e3e282ea0efbe8949ce1d576..eb407adf8cb0b03f1712179325093f135c5de619 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "fifo.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index b9bbd0994ca7265d4457553d319a20ccf06db952..41af459f53b36408cd3a6e8ebc6c149809346b3f 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct FirstInFirstOut {
index 4f5f09dfe58dd2c658e9ecdda64d26144c7d02e4..88b88e99ef447185c8f1d0aa27e8a5bf852b420e 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "fq-codel.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 #include "strv.h"
index 2553c59886e00007bd33dce6025317cf7bee587c..b6c74a0fd09d8bab88d22eee4090e83d250f6b9c 100644 (file)
@@ -2,9 +2,8 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
-#include "time-util.h"
 
 typedef struct FairQueueingControlledDelay {
         QDisc meta;
index 8f4f7c431c441a074c4c40dc3843cd460084deff..2aac55dfc4cb15ffcaa5f79e1425c623b06ea44a 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "fq-pie.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index 51fb626a7a4decd773b7de6d087106f67437269b..b5acb78bac0eb56c3c26eb8e428423d0e71e6b6b 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct FlowQueuePIE {
index ea55e5cb0a122d67370cb42bf41ebadf93f2fe93..47a51a4a3eff4ac25b498c0105a6464d69c05e29 100644 (file)
@@ -3,11 +3,11 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "fq.h"
+#include "log.h"
 #include "logarithm.h"
-#include "netlink-util.h"
 #include "parse-util.h"
 #include "string-util.h"
 #include "strv.h"
index 77469c4103d065ac39a196b0d117fea568655e88..ef25f43674fe1303ae6c5908432d55f014c6c7bf 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct FairQueueing {
index 550c2da0f416a00d3195062a3d0abdfe2a518d26..258f9aa6497cb10c669f043c3f63e0c468b7d28a 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "gred.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index c084ff12ececdadad435e32f6476dd25ab291c4a..59209cd7ff5449e1f0e7cd46c780ae1752f53acc 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct GenericRandomEarlyDetection {
index 9ddb7ef9063d5d00ce209c052ff1dfe05dbaec2c..f13fcff03f481e916cd4df4e749daa266420517c 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "hhf.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "string-util.h"
 
index 04caaa8aa4085ac62ab4d44482a6a256cd9a04fb..ceab4ffc71ed22fbf57c749224410517aceb8543 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct HeavyHitterFilter {
index 1dbad284643a120599c801d77c34b9e86513aeb8..5c85e1a76d5e68e724576a9265bf40f64567da4f 100644 (file)
@@ -2,10 +2,10 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "sd-netlink.h"
+
 #include "htb.h"
-#include "netlink-util.h"
+#include "log-link.h"
 #include "networkd-link.h"
 #include "parse-util.h"
 #include "qdisc.h"
index 55644dbdd2a60d41321e74c5d3a14439b2e5c550..c7c342b56218a8dd8fb3f6e9eba25e9136607465 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 #include "tclass.h"
 
index 1435ed1fda0fa54f11092cef1c20949eab32db71..3f0cbbb41412c6ad89e23c655c0a69d767c661eb 100644 (file)
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "forward.h"
 #include "mq.h"
 
 const QDiscVTable mq_vtable = {
index 88f0049670cf1b460825aab457db2353b453fb25..d963f886fe7b3f086cfff8d9c61766af4368b5c2 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct ClassfulMultiQueueing {
index 5e637e9e514c8b4f17d878929127c62c6c627e83..ab0eb4f57b07882958c9ef65430ef9f90169ff93 100644 (file)
@@ -2,6 +2,8 @@
 
 #include <linux/pkt_sched.h>
 
+#include "sd-netlink.h"
+
 #include "multiq.h"
 
 static int multi_queueing_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
index e53ed57c716ab578b73524d29fd332d21b832c64..132ffdf34df1fcb0a1de56e4b04b0c0844dc6d27 100644 (file)
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct BandMultiQueueing {
index 51039de1f4e7b7b4027a28cb96633f9418a15482..e7c0da8c44a7cf194be193d0d75f682186d23152 100644 (file)
@@ -2,14 +2,14 @@
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
+#include "sd-netlink.h"
 
-#include "alloc-util.h"
-#include "conf-parser.h"
+#include "log-link.h"
 #include "netem.h"
-#include "netlink-util.h"
-#include "networkd-manager.h"
+#include "networkd-link.h"
 #include "parse-util.h"
 #include "qdisc.h"
+#include "string-util.h"
 #include "strv.h"
 #include "tc-util.h"
 
index d58d5ac765a16663d77e192f7c747e5c61267318..ebc653fb4e5d346ee0ca52c803d3bb34a43f7254 100644 (file)
@@ -2,9 +2,8 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
-#include "time-util.h"
 
 typedef struct NetworkEmulator {
         QDisc meta;
index 8a0fa4a8cf208a785a3de45895f36693f2174c41..653bdc37344f9b1d7aeebbb924270995d485f9d9 100644 (file)
@@ -3,9 +3,9 @@
 
 #include <linux/pkt_sched.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
+#include "sd-netlink.h"
+
+#include "log.h"
 #include "parse-util.h"
 #include "pie.h"
 #include "string-util.h"
index 40a114e7d1620fb8ac01ce310c474dcd0b82db15..09e7ee4dddbf29fbd856be36bd31436947c7cfc7 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct ProportionalIntegralControllerEnhanced {
index 401c9fe8e680430a4831139b26317fa0de399c76..e16ace841e3ae2b0337e0481b109203dd27732f5 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
+#include "sd-netlink.h"
 
 #include "alloc-util.h"
 #include "cake.h"
 #include "gred.h"
 #include "hhf.h"
 #include "htb.h"
-#include "in-addr-util.h"
 #include "mq.h"
 #include "multiq.h"
 #include "netem.h"
-#include "netlink-util.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "networkd-queue.h"
+#include "ordered-set.h"
 #include "parse-util.h"
 #include "pie.h"
 #include "qdisc.h"
@@ -32,6 +32,7 @@
 #include "set.h"
 #include "sfb.h"
 #include "sfq.h"
+#include "siphash24.h"
 #include "string-util.h"
 #include "strv.h"
 #include "tbf.h"
index 5a2b1be5f429d2575bcea61cbfd6acba695e3d04..51929d67f79298523f5db54993c909dd14ef64d0 100644 (file)
@@ -2,13 +2,9 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
 
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
-
 typedef enum QDiscKind {
         QDISC_KIND_BFIFO,
         QDISC_KIND_CAKE,
index 0da53a89e432ece2a7f9865ba0a1fe35dd6b01a6..f021eeb73f74163d5d064760785988a263b6966c 100644 (file)
@@ -2,7 +2,9 @@
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
+#include "sd-netlink.h"
 
+#include "log.h"
 #include "parse-util.h"
 #include "qdisc.h"
 #include "qfq.h"
index 2e6599391acf7d80665983e0c1201b346020e3be..fea151070d1f74a895a8d5136f297ed0116ae833 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 #include "tclass.h"
 
index 07fac6700f693b83b11ab844dbe642959258b7f9..e704c03af5be129503d6fc294f8441476a76f040 100644 (file)
@@ -2,10 +2,9 @@
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
+#include "sd-netlink.h"
 
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
+#include "log.h"
 #include "parse-util.h"
 #include "qdisc.h"
 #include "sfb.h"
index 628df358e8999b427d6e10794a0aad8dca706a01..ef1ece124c2815b27904ce0a10a2691e3a259ea4 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct StochasticFairBlue {
index 78778653439cbedf0640d1dccd0879592d4d9278..e50df380c4e97dd514401cc85d4ff0fb3d7227d5 100644 (file)
@@ -2,11 +2,9 @@
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
+#include "sd-netlink.h"
 
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "netlink-util.h"
-#include "parse-util.h"
+#include "log.h"
 #include "qdisc.h"
 #include "sfq.h"
 #include "string-util.h"
index 1626775d63d8cce83837ac0a5b97276178fcd69f..ac98f21fafea478678fb938a6dd824b727f0ddc7 100644 (file)
@@ -2,9 +2,8 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
-#include "time-util.h"
 
 typedef struct StochasticFairnessQueueing {
         QDisc meta;
index 85ecbe39be8eb71519e99a5d74e617187f6138f4..9abf47d410020cc593076a9d489a9c2b2e7e86c1 100644 (file)
@@ -2,18 +2,16 @@
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
-#include <math.h>
 
-#include "alloc-util.h"
-#include "conf-parser.h"
-#include "netem.h"
-#include "netlink-util.h"
-#include "networkd-manager.h"
+#include "sd-netlink.h"
+
+#include "log-link.h"
+#include "networkd-link.h"
 #include "parse-util.h"
-#include "string-util.h"
 #include "strv.h"
 #include "tbf.h"
 #include "tc-util.h"
+#include "string-util.h"
 
 static int token_bucket_filter_fill_message(Link *link, QDisc *qdisc, sd_netlink_message *req) {
         uint32_t rtab[256], ptab[256];
index 6b4b017c7c84a592e25e158b0035db40871ce645..091f3d2d5a4e35b94bee4c957d87bfd938a02e63 100644 (file)
@@ -2,9 +2,8 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
-#include "time-util.h"
 
 typedef struct TokenBucketFilter {
         QDisc meta;
index ce9b5ecdae85c611c7f9145bdec348cd05040ef0..94e8d2615a31502560b2ac2237575f7bc8bfcd36 100644 (file)
@@ -1,8 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
+#include <stdio.h>
+
 #include "alloc-util.h"
-#include "assert-util.h"
 #include "extract-word.h"
 #include "fileio.h"
 #include "parse-util.h"
index 83bad8e3b769320d70285ca45a1a117e6f837757..5c2ab002b41689dfb1377e2ee77aab164987998b 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <linux/pkt_sched.h>
 
-#include "time-util.h"
+#include "forward.h"
 
 int tc_init(double *ret_ticks_in_usec, uint32_t *ret_hz);
 int tc_time_to_tick(usec_t t, uint32_t *ret);
index 4679e86ac978983d4c61500213a62588b4e5cf5c..8884b8830d029dd6e756ad70660f4fa1372a018c 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "macro.h"
+#include "hashmap.h"
 #include "networkd-link.h"
 #include "networkd-network.h"
 #include "qdisc.h"
index 6226578ec516aa0a33a720274e6283793b5926d8..0bcf20a355009b82ea8cb81853c4ddbf35df9dfa 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-typedef struct Link Link;
+#include "networkd-forward.h"
 
 int link_request_traffic_control(Link *link);
index 61ba42e45feb6e92c0ff56b2a609d10ae57cb90b..3b53a59a1b686a2659384de11c7a92241d385126 100644 (file)
@@ -3,21 +3,21 @@
 
 #include <linux/pkt_sched.h>
 
+#include "sd-netlink.h"
+
 #include "alloc-util.h"
 #include "conf-parser.h"
 #include "drr.h"
 #include "htb.h"
-#include "in-addr-util.h"
-#include "netlink-util.h"
 #include "networkd-link.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "networkd-queue.h"
-#include "parse-util.h"
+#include "ordered-set.h"
 #include "qfq.h"
 #include "set.h"
+#include "siphash24.h"
 #include "string-util.h"
-#include "strv.h"
 #include "tc-util.h"
 #include "tclass.h"
 
index b5dc5c8c3cdd898e0527e96a95d60f9c6be7a2ed..2bba38be8d5fc10c91445a13eb3b48cd6ff28323 100644 (file)
@@ -2,13 +2,9 @@
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
-#include "conf-parser.h"
+#include "networkd-forward.h"
 #include "networkd-util.h"
 
-typedef struct Link Link;
-typedef struct Manager Manager;
-typedef struct Network Network;
-
 typedef enum TClassKind {
         TCLASS_KIND_DRR,
         TCLASS_KIND_HTB,
index 06640afc31648c20a5900cf771f4240b8bd27a84..3fc0f11f6d46484ee8d76e99708e53d282ffa9d0 100644 (file)
@@ -1,7 +1,9 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <stdio.h>
+
 #include "alloc-util.h"
-#include "macro.h"
+#include "log.h"
 #include "networkd-link.h"
 #include "parse-util.h"
 #include "string-util.h"
index 8d0085ea5467ed56ce05f1c05cd0b8dd17470878..7aa16bb6ee79cb7c42c5667b8a16f992c1ef103e 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "conf-parser.h"
+#include "forward.h"
 #include "qdisc.h"
 
 typedef struct TrivialLinkEqualizer {
index 5ad028bd3b5190d552f0c55d3d682c9449f35b65..d29331b9f28a067ce6126512e6cf2d36beb7bff8 100644 (file)
@@ -1,19 +1,20 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <linux/if.h>
 #include <net/if.h>
 
-#include "bond.h"
-#include "dhcp6-internal.h"
+#include "sd-dhcp-lease.h"
+
+#include "bond-util.h"
 #include "dhcp6-protocol.h"
 #include "ethtool-util.h"
-#include "ipvlan.h"
+#include "ipvlan-util.h"
 #include "lldp-rx-internal.h"
-#include "macvlan.h"
+#include "macvlan-util.h"
 #include "ndisc-internal.h"
-#include "networkd-link.h"
-#include "networkd-network.h"
-#include "networkd-util.h"
+#include "networkd-dns.h"
+#include "networkd-lldp-rx.h"
+#include "networkd-radv.h"
+#include "networkd-sysctl.h"
 #include "test-tables.h"
 #include "tests.h"
 #include "tunnel.h"
index b98b9ecfb543c0cceebc63da26bcb29a119be67f..fbeed4f316cfe55f5e19dbf4a95960fea3ba436f 100644 (file)
@@ -2,14 +2,11 @@
 
 #include <arpa/inet.h>
 
-#include "sd-device.h"
-
 #include "alloc-util.h"
 #include "dhcp-lease-internal.h"
-#include "ether-addr-util.h"
+#include "hashmap.h"
 #include "hostname-setup.h"
 #include "network-internal.h"
-#include "networkd-address.h"
 #include "networkd-manager.h"
 #include "networkd-route-util.h"
 #include "string-util.h"
index a3dc42a9ea5a5550a98305e173ffbd50f32ed28e..e4533737bfc95001872bdfbeb895d27492e2d810 100644 (file)
@@ -1,13 +1,12 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "conf-parser.h"
 #include "hexdecoct.h"
-#include "log.h"
-#include "macro.h"
 #include "net-condition.h"
 #include "networkd-address.h"
-#include "networkd-conf.h"
 #include "networkd-manager.h"
 #include "networkd-network.h"
+#include "set.h"
 #include "strv.h"
 #include "tests.h"
 
index c369cc115a9a22754b06ad8782a9cca63e3877b9..320f50a981ec38cec9d38ef1ea03bf45b1fb80c4 100644 (file)
@@ -10,7 +10,7 @@
 #include "iovec-util.h"
 #include "json-util.h"
 #include "set.h"
-#include "strv.h"
+#include "string-util.h"
 
 DNSServer* dns_server_free(DNSServer *s) {
         if (!s)
index 6e6890d92507318ccc966a15443c78f9aff437ed..535c095137bd84c354b0dfd9ed6b0d18847c7ced 100644 (file)
@@ -1,46 +1,39 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-json.h"
+#include <sys/uio.h>
 
-#include "hash-funcs.h"
-#include "iovec-util.h"
-#include "macro-fundamental.h"
-#include "set.h"
+#include "forward.h"
 
-typedef struct DNSServer DNSServer;
-typedef struct SearchDomain SearchDomain;
-typedef struct DNSConfiguration DNSConfiguration;
-
-struct DNSServer {
+typedef struct DNSServer {
         struct iovec addr;
         int family;
         uint16_t port;
         int ifindex;
         char *server_name;
         bool accessible;
-};
+} DNSServer;
 
 DNSServer* dns_server_free(DNSServer *s);
 DEFINE_TRIVIAL_CLEANUP_FUNC(DNSServer*, dns_server_free);
 
-struct SearchDomain {
+typedef struct SearchDomain {
         char *name;
         bool route_only;
         int ifindex;
-};
+} SearchDomain;
 
 SearchDomain* search_domain_free(SearchDomain *d);
 DEFINE_TRIVIAL_CLEANUP_FUNC(SearchDomain*, search_domain_free);
 
-struct DNSConfiguration {
+typedef struct DNSConfiguration {
         char *ifname;
         int ifindex;
         bool default_route;
         DNSServer *current_dns_server;
         Set *dns_servers;
         Set *search_domains;
-};
+} DNSConfiguration;
 
 DNSConfiguration* dns_configuration_free(DNSConfiguration *c);
 DEFINE_TRIVIAL_CLEANUP_FUNC(DNSConfiguration*, dns_configuration_free);
index f7c2e4fc987ecec5e9be954bb04cfb1abf695d47..3b7e336a7df1d01d318b7bfe7abb170208567653 100644 (file)
@@ -1,11 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "sd-netlink.h"
 #include "sd-network.h"
 
 #include "alloc-util.h"
 #include "dns-configuration.h"
 #include "format-ifname.h"
 #include "hashmap.h"
+#include "log-link.h"
 #include "string-util.h"
 #include "strv.h"
 #include "wait-online-link.h"
index 33d0a85e8dc5c6998d0c3b2518b265fd56d944ed..20b1764cfb2ae3f3d9fe8ec92665d1173bda311b 100644 (file)
@@ -1,16 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-netlink.h"
-
-#include "dns-configuration.h"
-#include "log-link.h"
+#include "forward.h"
 #include "network-util.h"
 
-typedef struct Link Link;
+typedef struct DNSConfiguration DNSConfiguration;
 typedef struct Manager Manager;
 
-struct Link {
+typedef struct Link {
         Manager *manager;
 
         int ifindex;
@@ -26,7 +23,7 @@ struct Link {
         LinkAddressState ipv6_address_state;
         char *state;
         DNSConfiguration *dns_configuration;
-};
+} Link;
 
 int rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata);
 int link_update_monitor(Link *l);
index 0ff2c77277ffd58844ce9b567f94e1e6925fdf4e..2d014a3ec781052ac3efc17a12056c92b1d052d9 100644 (file)
@@ -1,20 +1,20 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include <fnmatch.h>
-#include <linux/if.h>
-#include <netinet/ether.h>
+#include <net/if.h>
 
 #include "sd-event.h"
 #include "sd-json.h"
+#include "sd-netlink.h"
+#include "sd-network.h"
 #include "sd-varlink.h"
 
 #include "alloc-util.h"
 #include "dns-configuration.h"
+#include "hashmap.h"
 #include "json-util.h"
-#include "netlink-util.h"
+#include "log-link.h"
 #include "string-util.h"
 #include "strv.h"
-#include "time-util.h"
 #include "wait-online-link.h"
 #include "wait-online-manager.h"
 
index e5ff8c21ba8aad4d8528ce397326791e8669714c..591552dc24cbbc0621e5ddf54bbad520e9dea35e 100644 (file)
@@ -1,20 +1,13 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include "sd-event.h"
-#include "sd-netlink.h"
-#include "sd-network.h"
-#include "sd-varlink.h"
-
-#include "dns-configuration.h"
-#include "hashmap.h"
+#include "forward.h"
 #include "network-util.h"
-#include "time-util.h"
 
-typedef struct Manager Manager;
+typedef struct DNSConfiguration DNSConfiguration;
 typedef struct Link Link;
 
-struct Manager {
+typedef struct Manager {
         Hashmap *links_by_index;
         Hashmap *links_by_name;
 
@@ -38,7 +31,7 @@ struct Manager {
         sd_varlink *varlink_client;
         DNSConfiguration *dns_configuration;
         Hashmap *dns_configuration_by_link_index;
-};
+} Manager;
 
 Manager* manager_free(Manager *m);
 int manager_new(Manager **ret, Hashmap *command_line_interfaces_by_name, char **ignored_interfaces,
index c693b5335c85d53fa4e680602b5642c24985bb76..b1d0b9cde212d2c81ba2d2d400d8e87157c5e6be 100644 (file)
@@ -2,20 +2,20 @@
 
 #include <getopt.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 
-#include "sd-daemon.h"
+#include "sd-event.h"
 
 #include "alloc-util.h"
 #include "build.h"
 #include "daemon-util.h"
+#include "hashmap.h"
 #include "log.h"
 #include "main-func.h"
 #include "parse-argument.h"
 #include "pretty-print.h"
-#include "signal-util.h"
 #include "socket-util.h"
 #include "strv.h"
+#include "time-util.h"
 #include "wait-online-manager.h"
 
 static bool arg_quiet = false;