From ee446d57b844d18c3a283b62fe8fca0daac90e96 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 30 Sep 2020 02:24:02 +0900 Subject: [PATCH] network: cleanup networkd-fdb.h --- src/network/networkd-fdb.c | 5 ++--- src/network/networkd-fdb.h | 10 ++++------ src/network/networkd-link.c | 1 + src/network/networkd-network-gperf.gperf | 1 + src/network/networkd-network.c | 1 + src/network/networkd-network.h | 1 - src/network/networkd-sriov.h | 1 + src/network/networkd-wifi.c | 1 + src/network/test-network.c | 1 + 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/network/networkd-fdb.c b/src/network/networkd-fdb.c index c5e591d50b..47db929187 100644 --- a/src/network/networkd-fdb.c +++ b/src/network/networkd-fdb.c @@ -8,14 +8,13 @@ #include "alloc-util.h" #include "bridge.h" -#include "conf-parser.h" #include "netlink-util.h" #include "networkd-fdb.h" +#include "networkd-link.h" #include "networkd-manager.h" +#include "networkd-network.h" #include "parse-util.h" -#include "string-util.h" #include "string-table.h" -#include "util.h" #include "vlan-util.h" #include "vxlan.h" diff --git a/src/network/networkd-fdb.h b/src/network/networkd-fdb.h index 9ab44f9d3e..4aeb8be9ce 100644 --- a/src/network/networkd-fdb.h +++ b/src/network/networkd-fdb.h @@ -5,18 +5,16 @@ Copyright © 2014 Intel Corporation. All rights reserved. ***/ +#include #include #include "conf-parser.h" #include "ether-addr-util.h" -#include "list.h" -#include "macro.h" +#include "in-addr-util.h" #include "networkd-util.h" typedef struct Network Network; -typedef struct FdbEntry FdbEntry; typedef struct Link Link; -typedef struct NetworkConfigSection NetworkConfigSection; typedef enum NeighborCacheEntryFlags { NEIGHBOR_CACHE_ENTRY_FLAGS_USE = NTF_USE, @@ -27,7 +25,7 @@ typedef enum NeighborCacheEntryFlags { _NEIGHBOR_CACHE_ENTRY_FLAGS_INVALID = -1, } NeighborCacheEntryFlags; -struct FdbEntry { +typedef struct FdbEntry { Network *network; NetworkConfigSection *section; @@ -39,7 +37,7 @@ struct FdbEntry { struct ether_addr mac_addr; union in_addr_union destination_addr; NeighborCacheEntryFlags fdb_ntf_flags; -}; +} FdbEntry; FdbEntry *fdb_entry_free(FdbEntry *fdb_entry); diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 2282749fa6..aa9c0c528a 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -25,6 +25,7 @@ #include "networkd-dhcp-server.h" #include "networkd-dhcp4.h" #include "networkd-dhcp6.h" +#include "networkd-fdb.h" #include "networkd-ipv4ll.h" #include "networkd-ipv6-proxy-ndp.h" #include "networkd-link-bus.h" diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 648e882a29..ac28de39aa 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -13,6 +13,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") #include "networkd-dhcp-server.h" #include "networkd-dhcp4.h" #include "networkd-dhcp6.h" +#include "networkd-fdb.h" #include "networkd-ipv4ll.h" #include "networkd-ndisc.h" #include "networkd-network.h" diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index a8c32b9628..25b0046bd9 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -15,6 +15,7 @@ #include "networkd-dhcp-server.h" #include "network-internal.h" #include "networkd-address-label.h" +#include "networkd-fdb.h" #include "networkd-manager.h" #include "networkd-neighbor.h" #include "networkd-network.h" diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h index e1d22f1864..d471c98239 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -18,7 +18,6 @@ #include "networkd-dhcp4.h" #include "networkd-dhcp6.h" #include "networkd-dhcp-server.h" -#include "networkd-fdb.h" #include "networkd-ipv6-proxy-ndp.h" #include "networkd-lldp-rx.h" #include "networkd-lldp-tx.h" diff --git a/src/network/networkd-sriov.h b/src/network/networkd-sriov.h index a545d1292a..04cc4270f1 100644 --- a/src/network/networkd-sriov.h +++ b/src/network/networkd-sriov.h @@ -5,6 +5,7 @@ #include #include "conf-parser.h" +#include "ether-addr-util.h" #include "networkd-link.h" #include "networkd-network.h" #include "networkd-util.h" diff --git a/src/network/networkd-wifi.c b/src/network/networkd-wifi.c index 14a8687458..53b65286b3 100644 --- a/src/network/networkd-wifi.c +++ b/src/network/networkd-wifi.c @@ -6,6 +6,7 @@ #include "sd-bus.h" #include "bus-util.h" +#include "ether-addr-util.h" #include "netlink-internal.h" #include "netlink-util.h" #include "networkd-link.h" diff --git a/src/network/test-network.c b/src/network/test-network.c index eeb756ca04..e93e8c0cc0 100644 --- a/src/network/test-network.c +++ b/src/network/test-network.c @@ -7,6 +7,7 @@ #include "alloc-util.h" #include "dhcp-lease-internal.h" +#include "ether-addr-util.h" #include "hostname-util.h" #include "network-internal.h" #include "networkd-manager.h"