]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - src/network/meson.build
test-network: add more tests for traffic control
[thirdparty/systemd.git] / src / network / meson.build
... / ...
CommitLineData
1# SPDX-License-Identifier: LGPL-2.1+
2
3sources = files('''
4 netdev/bond.c
5 netdev/bond.h
6 netdev/bridge.c
7 netdev/bridge.h
8 netdev/dummy.c
9 netdev/dummy.h
10 netdev/ifb.c
11 netdev/ifb.h
12 netdev/ipvlan.c
13 netdev/ipvlan.h
14 netdev/macvlan.c
15 netdev/macvlan.h
16 netdev/netdev.c
17 netdev/netdev.h
18 netdev/nlmon.c
19 netdev/nlmon.h
20 netdev/tunnel.c
21 netdev/tunnel.h
22 netdev/tuntap.c
23 netdev/tuntap.h
24 netdev/vcan.c
25 netdev/vcan.h
26 netdev/veth.c
27 netdev/veth.h
28 netdev/vlan.c
29 netdev/vlan.h
30 netdev/vrf.c
31 netdev/vrf.h
32 netdev/vxlan.c
33 netdev/vxlan.h
34 netdev/geneve.c
35 netdev/geneve.h
36 netdev/vxcan.c
37 netdev/vxcan.h
38 netdev/wireguard.c
39 netdev/wireguard.h
40 netdev/netdevsim.c
41 netdev/netdevsim.h
42 netdev/fou-tunnel.c
43 netdev/fou-tunnel.h
44 netdev/l2tp-tunnel.c
45 netdev/l2tp-tunnel.h
46 netdev/macsec.c
47 netdev/macsec.h
48 netdev/xfrm.c
49 netdev/xfrm.h
50 networkd-address-label.c
51 networkd-address-label.h
52 networkd-address-pool.c
53 networkd-address-pool.h
54 networkd-address.c
55 networkd-address.h
56 networkd-brvlan.c
57 networkd-brvlan.h
58 networkd-can.c
59 networkd-can.h
60 networkd-conf.c
61 networkd-conf.h
62 networkd-dhcp-common.c
63 networkd-dhcp-common.h
64 networkd-dhcp-server.c
65 networkd-dhcp-server.h
66 networkd-dhcp4.c
67 networkd-dhcp4.h
68 networkd-dhcp6.c
69 networkd-dhcp6.h
70 networkd-fdb.c
71 networkd-fdb.h
72 networkd-ipv4ll.c
73 networkd-ipv4ll.h
74 networkd-ipv6-proxy-ndp.c
75 networkd-ipv6-proxy-ndp.h
76 networkd-link-bus.c
77 networkd-link-bus.h
78 networkd-link.c
79 networkd-link.h
80 networkd-lldp-rx.c
81 networkd-lldp-rx.h
82 networkd-lldp-tx.c
83 networkd-lldp-tx.h
84 networkd-manager-bus.c
85 networkd-manager-bus.h
86 networkd-manager.c
87 networkd-manager.h
88 networkd-ndisc.c
89 networkd-ndisc.h
90 networkd-neighbor.c
91 networkd-neighbor.h
92 networkd-radv.c
93 networkd-radv.h
94 networkd-network-bus.c
95 networkd-network-bus.h
96 networkd-network.c
97 networkd-network.h
98 networkd-nexthop.c
99 networkd-nexthop.h
100 networkd-route.c
101 networkd-route.h
102 networkd-routing-policy-rule.c
103 networkd-routing-policy-rule.h
104 networkd-speed-meter.c
105 networkd-speed-meter.h
106 networkd-util.c
107 networkd-util.h
108 networkd-wifi.c
109 networkd-wifi.h
110 tc/codel.c
111 tc/codel.h
112 tc/fq.c
113 tc/fq.h
114 tc/fq-codel.c
115 tc/fq-codel.h
116 tc/netem.c
117 tc/netem.h
118 tc/qdisc.c
119 tc/qdisc.h
120 tc/sfq.c
121 tc/sfq.h
122 tc/tbf.c
123 tc/tbf.h
124 tc/tc-util.c
125 tc/tc-util.h
126'''.split())
127
128systemd_networkd_sources = files('networkd.c')
129
130systemd_networkd_wait_online_sources = files('''
131 wait-online/link.c
132 wait-online/link.h
133 wait-online/manager.c
134 wait-online/manager.h
135 wait-online/wait-online.c
136'''.split()) + network_internal_h
137
138networkctl_sources = files('networkctl.c')
139
140network_generator_sources = files('''
141 generator/main.c
142 generator/network-generator.c
143 generator/network-generator.h
144'''.split())
145
146network_include_dir = [includes, include_directories(['.', 'netdev', 'tc'])]
147
148if conf.get('ENABLE_NETWORKD') == 1
149 if get_option('link-networkd-shared')
150 networkd_link_with = [libshared]
151 else
152 networkd_link_with = [libsystemd_static,
153 libshared_static,
154 libjournal_client,
155 libbasic_gcrypt]
156 endif
157
158 networkd_gperf_c = custom_target(
159 'networkd-gperf.c',
160 input : 'networkd-gperf.gperf',
161 output : 'networkd-gperf.c',
162 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
163
164 networkd_network_gperf_c = custom_target(
165 'networkd-network-gperf.c',
166 input : 'networkd-network-gperf.gperf',
167 output : 'networkd-network-gperf.c',
168 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
169
170 netdev_gperf_c = custom_target(
171 'netdev-gperf.c',
172 input : 'netdev/netdev-gperf.gperf',
173 output : 'netdev-gperf.c',
174 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
175
176 libnetworkd_core = static_library(
177 'networkd-core',
178 sources,
179 network_internal_h,
180 networkd_gperf_c,
181 networkd_network_gperf_c,
182 netdev_gperf_c,
183 include_directories : network_include_dir,
184 link_with : [networkd_link_with])
185
186 install_data('org.freedesktop.network1.conf',
187 install_dir : dbuspolicydir)
188 install_data('org.freedesktop.network1.service',
189 install_dir : dbussystemservicedir)
190 install_data('org.freedesktop.network1.policy',
191 install_dir : polkitpolicydir)
192 if install_polkit
193 install_data('systemd-networkd.rules',
194 install_dir : polkitrulesdir)
195 endif
196 if install_polkit_pkla
197 install_data('systemd-networkd.pkla',
198 install_dir : polkitpkladir)
199 endif
200
201 install_data('networkd.conf',
202 install_dir : pkgsysconfdir)
203
204 fuzzers += [
205 [['src/network/fuzz-netdev-parser.c',
206 'src/fuzz/fuzz.h'],
207 [libnetworkd_core,
208 libudev_static,
209 libsystemd_network,
210 networkd_link_with],
211 [threads],
212 [],
213 network_include_dir],
214
215 [['src/network/fuzz-network-parser.c',
216 'src/fuzz/fuzz.h'],
217 [libnetworkd_core,
218 libudev_static,
219 libsystemd_network,
220 networkd_link_with],
221 [threads],
222 [],
223 network_include_dir],
224 ]
225
226 tests += [
227 [['src/network/test-networkd-conf.c'],
228 [libnetworkd_core,
229 libsystemd_network,
230 libudev],
231 [], '', '', [], network_include_dir],
232
233 [['src/network/test-network.c'],
234 [libnetworkd_core,
235 libudev_static,
236 libsystemd_network,
237 networkd_link_with],
238 [threads],
239 '', '', [], network_include_dir],
240
241 [['src/network/test-routing-policy-rule.c'],
242 [libnetworkd_core,
243 libsystemd_network,
244 libudev],
245 [], '', '', [], network_include_dir],
246
247 [['src/network/test-network-tables.c',
248 test_tables_h],
249 [libnetworkd_core,
250 libudev_static,
251 libsystemd_network,
252 networkd_link_with],
253 [threads],
254 '', '', [],
255 [network_include_dir]],
256
257 [['src/network/generator/test-network-generator.c',
258 'src/network/generator/network-generator.c',
259 'src/network/generator/network-generator.h'],
260 [networkd_link_with],
261 [], '', '', [], network_include_dir],
262 ]
263endif