network: cleanup header inclusion

This commit is contained in:
Yu Watanabe
2019-10-30 17:02:15 +09:00
parent b7a4129ca9
commit 737f140546
49 changed files with 114 additions and 134 deletions

View File

@@ -2704,7 +2704,7 @@ public_programs += exe
if conf.get('ENABLE_NETWORKD') == 1
executable('systemd-networkd',
systemd_networkd_sources,
include_directories : includes,
include_directories : network_include_dir,
link_with : [libnetworkd_core,
libsystemd_network,
libudev_static,

View File

@@ -131,7 +131,7 @@ network_generator_sources = files('''
generator/network-generator.h
'''.split())
network_include_dir = include_directories('.')
network_include_dir = [includes, include_directories(['.', 'netdev', 'tc'])]
if conf.get('ENABLE_NETWORKD') == 1
networkd_gperf_c = custom_target(
@@ -159,7 +159,7 @@ if conf.get('ENABLE_NETWORKD') == 1
networkd_gperf_c,
networkd_network_gperf_c,
netdev_gperf_c,
include_directories : includes,
include_directories : network_include_dir,
link_with : [libshared])
install_data('org.freedesktop.network1.conf',
@@ -187,7 +187,9 @@ if conf.get('ENABLE_NETWORKD') == 1
libudev_static,
libsystemd_network,
libshared],
[threads]],
[threads],
[],
network_include_dir],
[['src/network/fuzz-network-parser.c',
'src/fuzz/fuzz.h'],
@@ -195,7 +197,9 @@ if conf.get('ENABLE_NETWORKD') == 1
libudev_static,
libsystemd_network,
libshared],
[threads]]
[threads],
[],
network_include_dir],
]
tests += [
@@ -203,20 +207,21 @@ if conf.get('ENABLE_NETWORKD') == 1
[libnetworkd_core,
libsystemd_network,
libudev],
[]],
[], '', '', [], network_include_dir],
[['src/network/test-network.c'],
[libnetworkd_core,
libudev_static,
libsystemd_network,
libshared],
[threads]],
[threads],
'', '', [], network_include_dir],
[['src/network/test-routing-policy-rule.c'],
[libnetworkd_core,
libsystemd_network,
libudev],
[]],
[], '', '', [], network_include_dir],
[['src/network/test-network-tables.c',
test_tables_h],
@@ -233,6 +238,6 @@ if conf.get('ENABLE_NETWORKD') == 1
'src/network/generator/network-generator.c',
'src/network/generator/network-generator.h'],
[libshared],
[]],
[], '', '', [], network_include_dir],
]
endif

View File

@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include "sd-netlink.h"
#include "alloc-util.h"
#include "bond.h"
#include "conf-parser.h"

View File

@@ -2,9 +2,9 @@
#include <net/if.h>
#include "bridge.h"
#include "missing.h"
#include "netlink-util.h"
#include "netdev/bridge.h"
#include "network-internal.h"
#include "networkd-manager.h"
#include "string-table.h"

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include "netdev/dummy.h"
#include "dummy.h"
const NetDevVTable dummy_vtable = {
.object_size = sizeof(Dummy),

View File

@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
#include "netdev/netdev.h"
#include "netdev.h"
typedef struct Dummy {
NetDev meta;

View File

@@ -6,14 +6,12 @@
#include <linux/ip.h>
#include "conf-parser.h"
#include "fou-tunnel.h"
#include "ip-protocol-list.h"
#include "missing.h"
#include "netdev/fou-tunnel.h"
#include "netlink-util.h"
#include "networkd-link.h"
#include "networkd-manager.h"
#include "parse-util.h"
#include "sd-netlink.h"
#include "string-table.h"
#include "string-util.h"
#include "util.h"

View File

@@ -5,7 +5,7 @@
#include <linux/fou.h>
#include "in-addr-util.h"
#include "netdev/netdev.h"
#include "netdev.h"
typedef enum FooOverUDPEncapType {
NETDEV_FOO_OVER_UDP_ENCAP_UNSPEC = FOU_ENCAP_UNSPEC,

View File

@@ -2,19 +2,17 @@
#include <net/if.h>
#include "sd-netlink.h"
#include "alloc-util.h"
#include "conf-parser.h"
#include "extract-word.h"
#include "geneve.h"
#include "missing.h"
#include "netlink-util.h"
#include "networkd-manager.h"
#include "parse-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "missing.h"
#include "networkd-manager.h"
#define GENEVE_FLOW_LABEL_MAX_MASK 0xFFFFFU
#define DEFAULT_GENEVE_DESTINATION_PORT 6081

View File

@@ -5,7 +5,6 @@ typedef struct Geneve Geneve;
#include "in-addr-util.h"
#include "netdev.h"
#include "networkd-link.h"
#include "networkd-network.h"
#define GENEVE_VID_MAX (1u << 24) - 1

View File

@@ -3,7 +3,7 @@
#include <net/if.h>
#include "conf-parser.h"
#include "netdev/ipvlan.h"
#include "ipvlan.h"
#include "networkd-link.h"
#include "string-table.h"

View File

@@ -4,7 +4,7 @@
#include <netinet/in.h>
#include <linux/if_link.h>
#include "netdev/netdev.h"
#include "netdev.h"
typedef enum IPVlanMode {
NETDEV_IPVLAN_MODE_L2 = IPVLAN_MODE_L2,

View File

@@ -4,8 +4,6 @@
#include <linux/l2tp.h>
#include <linux/genetlink.h>
#include "sd-netlink.h"
#include "conf-parser.h"
#include "hashmap.h"
#include "l2tp-tunnel.h"

View File

@@ -17,7 +17,6 @@
#include "networkd-address.h"
#include "networkd-manager.h"
#include "path-util.h"
#include "sd-netlink.h"
#include "socket-util.h"
#include "string-table.h"
#include "string-util.h"

View File

@@ -3,7 +3,7 @@
#include <net/if.h>
#include "conf-parser.h"
#include "netdev/macvlan.h"
#include "macvlan.h"
#include "string-table.h"
static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {

View File

@@ -3,7 +3,7 @@
typedef struct MacVlan MacVlan;
#include "netdev/netdev.h"
#include "netdev.h"
typedef enum MacVlanMode {
NETDEV_MACVLAN_MODE_PRIVATE = MACVLAN_MODE_PRIVATE,

View File

@@ -3,27 +3,27 @@
_Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
#endif
#include <stddef.h>
#include "bond.h"
#include "bridge.h"
#include "conf-parser.h"
#include "network-internal.h"
#include "netdev/bond.h"
#include "netdev/bridge.h"
#include "netdev/geneve.h"
#include "netdev/ipvlan.h"
#include "netdev/macsec.h"
#include "netdev/macvlan.h"
#include "netdev/tunnel.h"
#include "netdev/tuntap.h"
#include "netdev/veth.h"
#include "netdev/vlan.h"
#include "netdev/vxlan.h"
#include "netdev/vrf.h"
#include "netdev/netdev.h"
#include "netdev/vxcan.h"
#include "netdev/wireguard.h"
#include "netdev/fou-tunnel.h"
#include "netdev/l2tp-tunnel.h"
#include "netdev/xfrm.h"
#include "geneve.h"
#include "ipvlan.h"
#include "macsec.h"
#include "macvlan.h"
#include "tunnel.h"
#include "tuntap.h"
#include "veth.h"
#include "vlan-util.h"
#include "vlan.h"
#include "vxlan.h"
#include "vrf.h"
#include "netdev.h"
#include "network-internal.h"
#include "vxcan.h"
#include "wireguard.h"
#include "fou-tunnel.h"
#include "l2tp-tunnel.h"
#include "xfrm.h"
%}
struct ConfigPerfItem;
%null_strings

View File

@@ -4,41 +4,40 @@
#include <netinet/in.h>
#include "alloc-util.h"
#include "bond.h"
#include "bridge.h"
#include "conf-files.h"
#include "conf-parser.h"
#include "dummy.h"
#include "fd-util.h"
#include "fou-tunnel.h"
#include "geneve.h"
#include "ipvlan.h"
#include "l2tp-tunnel.h"
#include "list.h"
#include "netdev/bond.h"
#include "netdev/bridge.h"
#include "netdev/dummy.h"
#include "netdev/fou-tunnel.h"
#include "netdev/geneve.h"
#include "netdev/ipvlan.h"
#include "netdev/l2tp-tunnel.h"
#include "netdev/macsec.h"
#include "netdev/macvlan.h"
#include "netdev/netdev.h"
#include "netdev/netdevsim.h"
#include "netdev/nlmon.h"
#include "netdev/tunnel.h"
#include "netdev/tuntap.h"
#include "netdev/vcan.h"
#include "netdev/veth.h"
#include "netdev/vlan.h"
#include "netdev/vrf.h"
#include "netdev/vxcan.h"
#include "netdev/vxlan.h"
#include "netdev/wireguard.h"
#include "netdev/xfrm.h"
#include "macsec.h"
#include "macvlan.h"
#include "netdev.h"
#include "netdevsim.h"
#include "netlink-util.h"
#include "network-internal.h"
#include "networkd-link.h"
#include "networkd-manager.h"
#include "nlmon.h"
#include "siphash24.h"
#include "stat-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "tunnel.h"
#include "tuntap.h"
#include "vcan.h"
#include "veth.h"
#include "vlan.h"
#include "vrf.h"
#include "vxcan.h"
#include "vxlan.h"
#include "wireguard.h"
#include "xfrm.h"
const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
[NETDEV_KIND_BRIDGE] = &bridge_vtable,

View File

@@ -5,7 +5,7 @@
#include "conf-parser.h"
#include "list.h"
#include "../networkd-link.h"
#include "networkd-link.h"
#include "time-util.h"
typedef struct netdev_join_callback netdev_join_callback;

View File

@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
#include "netdev/netdevsim.h"
#include "missing.h"
#include "netdevsim.h"
const NetDevVTable netdevsim_vtable = {
.object_size = sizeof(NetDevSim),

Some files were not shown because too many files have changed in this diff Show More