blob: 4e4b2c0acb3e199ab235ea7d86149bf6ac6f921f [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# Copyright (c) 2015 Cisco and/or its affiliates.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at:
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14AUTOMAKE_OPTIONS = foreign subdir-objects
15
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +000016AM_CFLAGS = -Wall -Werror @DPDK@ @DPDK_CRYPTO@ @IPSEC@ @IPV6SR@
Ed Warnickecb9cada2015-12-08 15:45:58 -070017
Dave Barachb5e8a772016-12-06 12:04:42 -050018BUILT_SOURCES = \
Ole Troanf0c90e22016-12-06 12:50:08 +010019 vnet/interface.api.h \
20 vnet/interface.api.json \
Dave Barachb5e8a772016-12-06 12:04:42 -050021 vnet/ip/ip.api.h \
22 vnet/ip/ip.api.json \
Ole Troanf0c90e22016-12-06 12:50:08 +010023 vnet/l2/l2.api.h \
24 vnet/l2/l2.api.json \
25 vnet/map/map.api.h \
Pavel Kotucek3a2a1c42016-12-06 10:10:10 +010026 vnet/map/map.api.json \
27 vnet/span/span.api.h \
Dave Barach496e1272016-12-07 09:15:58 -050028 vnet/span/span.api.json \
29 vnet/unix/tap.api.h \
30 vnet/unix/tap.api.json
Dave Barachaff70772016-10-31 11:59:07 -040031
Ed Warnickecb9cada2015-12-08 15:45:58 -070032libvnet_la_SOURCES =
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -040033libvnetplugin_la_SOURCES =
Ed Warnickecb9cada2015-12-08 15:45:58 -070034nobase_include_HEADERS =
Dave Barach4e281a42015-12-14 11:13:29 -050035noinst_PROGRAMS =
Filip Tehlar254b0362016-04-07 10:04:34 +020036TESTS =
Ed Warnickecb9cada2015-12-08 15:45:58 -070037
Ole Troand575e692016-08-25 12:26:47 +020038dpdk_libs =
39if WITH_DPDK
40dpdk_libs += -l:libdpdk.a
41endif
42
Ed Warnickecb9cada2015-12-08 15:45:58 -070043########################################
44# Generic stuff
45########################################
46libvnet_la_SOURCES += \
47 vnet/config.c \
Damjan Marion51327ac2016-11-09 11:59:42 +010048 vnet/devices/devices.c \
Damjan Marion0247b462016-06-08 01:37:11 +020049 vnet/handoff.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070050 vnet/interface.c \
Dave Barachaff70772016-10-31 11:59:07 -040051 vnet/interface_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070052 vnet/interface_cli.c \
53 vnet/interface_format.c \
54 vnet/interface_output.c \
55 vnet/misc.c \
56 vnet/replication.c \
57 vnet/rewrite.c
58
59nobase_include_HEADERS += \
60 vnet/api_errno.h \
61 vnet/buffer.h \
62 vnet/config.h \
Damjan Marion8bdc63b2016-11-02 14:48:21 +010063 vnet/devices/devices.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070064 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020065 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070066 vnet/interface.h \
Dave Barachaff70772016-10-31 11:59:07 -040067 vnet/interface.api.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070068 vnet/interface_funcs.h \
69 vnet/l3_types.h \
70 vnet/pipeline.h \
71 vnet/replication.h \
72 vnet/rewrite.h \
Dave Barachaff70772016-10-31 11:59:07 -040073 vnet/vnet.h \
74 vnet/vnet_all_api_h.h \
75 vnet/vnet_msg_enum.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070076
77########################################
78# Policer infra
79########################################
80
81libvnet_la_SOURCES += \
82 vnet/policer/node_funcs.c \
83 vnet/policer/policer.c \
84 vnet/policer/xlate.c
85
86nobase_include_HEADERS += \
87 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070088 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070089 vnet/policer/xlate.h
90
Dave Barachc07bf5d2016-02-17 17:52:26 -050091########################################
92# Cop - junk filter
93########################################
94
95libvnet_la_SOURCES += \
96 vnet/cop/cop.c \
97 vnet/cop/node1.c \
98 vnet/cop/ip4_whitelist.c \
99 vnet/cop/ip6_whitelist.c
100
101nobase_include_HEADERS += \
102 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700103
104########################################
105# Layer 2 protocols go here
106########################################
107
108########################################
109# Layer 2 protocol: Ethernet
110########################################
111libvnet_la_SOURCES += \
112 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700113 vnet/ethernet/format.c \
114 vnet/ethernet/init.c \
115 vnet/ethernet/interface.c \
116 vnet/ethernet/node.c \
117 vnet/ethernet/pg.c
118
119nobase_include_HEADERS += \
120 vnet/ethernet/arp_packet.h \
121 vnet/ethernet/error.def \
122 vnet/ethernet/ethernet.h \
123 vnet/ethernet/packet.h \
124 vnet/ethernet/types.def
125
126########################################
127# Layer 2 protocol: Ethernet bridging
128########################################
129libvnet_la_SOURCES += \
130 vnet/l2/feat_bitmap.c \
Matus Fabianf468e232016-12-02 06:00:53 -0800131 vnet/l2/l2_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700132 vnet/l2/l2_bd.c \
133 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400134 vnet/l2/l2_input_classify.c \
135 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700136 vnet/l2/l2_efp_filter.c \
137 vnet/l2/l2_fib.c \
138 vnet/l2/l2_flood.c \
139 vnet/l2/l2_fwd.c \
140 vnet/l2/l2_input_acl.c \
141 vnet/l2/l2_input.c \
142 vnet/l2/l2_input_vtr.c \
143 vnet/l2/l2_learn.c \
144 vnet/l2/l2_output_acl.c \
145 vnet/l2/l2_output.c \
146 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000147 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700148 vnet/l2/l2_vtr.c \
149 vnet/l2/l2_xcrw.c
150
151nobase_include_HEADERS += \
152 vnet/l2/feat_bitmap.h \
153 vnet/l2/l2_input.h \
154 vnet/l2/l2_output.h \
155 vnet/l2/l2_vtr.h \
156 vnet/l2/l2_input_vtr.h \
157 vnet/l2/l2_efp_filter.h \
158 vnet/l2/l2_fwd.h \
159 vnet/l2/l2_bd.h \
160 vnet/l2/l2_bvi.h \
161 vnet/l2/l2_flood.h \
162 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000163 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700164 vnet/l2/l2_xcrw.h \
Matus Fabianf468e232016-12-02 06:00:53 -0800165 vnet/l2/l2_classify.h \
166 vnet/l2/l2.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700167
168########################################
169# Layer 2 protocol: SRP
170########################################
171libvnet_la_SOURCES += \
172 vnet/srp/format.c \
173 vnet/srp/interface.c \
174 vnet/srp/node.c \
175 vnet/srp/pg.c
176
177nobase_include_HEADERS += \
178 vnet/srp/packet.h \
179 vnet/srp/srp.h
180
181########################################
182# Layer 2 protocol: PPP
183########################################
184libvnet_la_SOURCES += \
185 vnet/ppp/node.c \
186 vnet/ppp/pg.c \
187 vnet/ppp/ppp.c
188
189nobase_include_HEADERS += \
190 vnet/ppp/error.def \
191 vnet/ppp/ppp.h \
192 vnet/ppp/packet.h
193
194########################################
195# Layer 2 protocol: HDLC
196########################################
197libvnet_la_SOURCES += \
198 vnet/hdlc/node.c \
199 vnet/hdlc/pg.c \
200 vnet/hdlc/hdlc.c
201
202nobase_include_HEADERS += \
203 vnet/hdlc/error.def \
204 vnet/hdlc/hdlc.h \
205 vnet/hdlc/packet.h
206
207########################################
208# Layer 2 protocol: LLC
209########################################
210libvnet_la_SOURCES += \
211 vnet/llc/llc.c \
212 vnet/llc/node.c \
213 vnet/llc/pg.c
214
215nobase_include_HEADERS += \
216 vnet/llc/llc.h
217
218########################################
219# Layer 2 protocol: SNAP
220########################################
221libvnet_la_SOURCES += \
222 vnet/snap/snap.c \
223 vnet/snap/node.c \
224 vnet/snap/pg.c
225
226nobase_include_HEADERS += \
227 vnet/snap/snap.h
228
229########################################
230# Layer 2 / vxlan
231########################################
232libvnet_la_SOURCES += \
233 vnet/vxlan/vxlan.c \
234 vnet/vxlan/encap.c \
235 vnet/vxlan/decap.c
236
237nobase_include_HEADERS += \
238 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500239 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700240 vnet/vxlan/vxlan_error.def
241
242########################################
Dave Barachced48e72016-02-08 15:57:35 -0500243# Layer 2 / CDP
244########################################
245libvnet_la_SOURCES += \
246 vnet/cdp/cdp_input.c \
247 vnet/cdp/cdp_node.c \
248 vnet/cdp/cdp_periodic.c
249
250nobase_include_HEADERS += \
251 vnet/cdp/cdp_protocol.h
252
253########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200254# Layer 2 / LLDP
255########################################
256libvnet_la_SOURCES += \
257 vnet/lldp/lldp_input.c \
258 vnet/lldp/lldp_node.c \
259 vnet/lldp/lldp_output.c \
260 vnet/lldp/lldp_cli.c
261
262nobase_include_HEADERS += \
263 vnet/lldp/lldp_protocol.h
264
265########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700266# Layer 2/3 "classify"
267########################################
268libvnet_la_SOURCES += \
269 vnet/classify/vnet_classify.c \
270 vnet/classify/ip_classify.c \
271 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700272 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700273 vnet/classify/flow_classify.c \
274 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700275 vnet/classify/vnet_classify.h
276
277nobase_include_HEADERS += \
278 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700279 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700280 vnet/classify/policer_classify.h \
281 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700282
283########################################
284# Layer 3 protocols go here
285########################################
286
Ed Warnickecb9cada2015-12-08 15:45:58 -0700287########################################
288# Layer 3 protocol: IP v4/v6
289########################################
290libvnet_la_SOURCES += \
291 vnet/ip/format.c \
292 vnet/ip/icmp4.c \
293 vnet/ip/icmp6.c \
294 vnet/ip/ip46_cli.c \
295 vnet/ip/ip4_format.c \
296 vnet/ip/ip4_forward.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700297 vnet/ip/ip4_input.c \
298 vnet/ip/ip4_mtrie.c \
299 vnet/ip/ip4_pg.c \
Dave Barach6f9bca22016-04-30 10:25:32 -0400300 vnet/ip/ip4_source_and_port_range_check.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200301 vnet/ip/ip4_source_check.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700302 vnet/ip/ip6_format.c \
303 vnet/ip/ip6_forward.c \
304 vnet/ip/ip6_hop_by_hop.c \
305 vnet/ip/ip6_input.c \
306 vnet/ip/ip6_neighbor.c \
307 vnet/ip/ip6_pg.c \
Dave Barachb5e8a772016-12-06 12:04:42 -0500308 vnet/ip/ip_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700309 vnet/ip/ip_checksum.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200310 vnet/ip/ip_frag.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700311 vnet/ip/ip.h \
312 vnet/ip/ip_init.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200313 vnet/ip/ip_input_acl.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700314 vnet/ip/lookup.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200315 vnet/ip/ping.c \
316 vnet/ip/punt.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700317 vnet/ip/udp_format.c \
318 vnet/ip/udp_init.c \
319 vnet/ip/udp_local.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200320 vnet/ip/udp_pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700321
322nobase_include_HEADERS += \
323 vnet/ip/format.h \
324 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100325 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700326 vnet/ip/icmp6.h \
327 vnet/ip/igmp_packet.h \
Dave Barachb5e8a772016-12-06 12:04:42 -0500328 vnet/ip/ip.api.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200329 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700330 vnet/ip/ip4.h \
331 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700332 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700333 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200334 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700335 vnet/ip/ip6_hop_by_hop.h \
336 vnet/ip/ip6_hop_by_hop_packet.h \
337 vnet/ip/ip6_packet.h \
Pavel Kotucek3e046ea2016-12-05 08:27:37 +0100338 vnet/ip/ip6_neighbor.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200339 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700340 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200341 vnet/ip/ip_source_and_port_range_check.h \
342 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700343 vnet/ip/ports.def \
344 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700345 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200346 vnet/ip/punt.h \
347 vnet/ip/tcp_packet.h \
348 vnet/ip/udp_error.def \
349 vnet/ip/udp.h \
350 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700351
352########################################
Klement Sekera0e3c0de2016-09-29 14:43:44 +0200353# Bidirectional Forwarding Detection
354########################################
355
356nobase_include_HEADERS += \
357 vnet/bfd/bfd_protocol.h \
358 vnet/bfd/bfd_main.h \
359 vnet/bfd/bfd_api.h \
360 vnet/bfd/bfd_udp.h
361
362libvnet_la_SOURCES += \
363 vnet/bfd/bfd_api.h \
364 vnet/bfd/bfd_udp.c \
365 vnet/bfd/bfd_main.c \
366 vnet/bfd/bfd_protocol.c
367
368########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700369# Layer 3 protocol: IPSec
370########################################
Dave Barach61efa142016-01-22 08:23:09 -0500371if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700372libvnet_la_SOURCES += \
373 vnet/ipsec/ipsec.c \
374 vnet/ipsec/ipsec_cli.c \
375 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700376 vnet/ipsec/ipsec_input.c \
377 vnet/ipsec/ipsec_if.c \
378 vnet/ipsec/ipsec_if_in.c \
379 vnet/ipsec/ipsec_if_out.c \
380 vnet/ipsec/esp_encrypt.c \
381 vnet/ipsec/esp_decrypt.c \
382 vnet/ipsec/ikev2.c \
383 vnet/ipsec/ikev2_crypto.c \
384 vnet/ipsec/ikev2_cli.c \
385 vnet/ipsec/ikev2_payload.c \
386 vnet/ipsec/ikev2_format.c
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000387if WITH_DPDK_CRYPTO
388libvnet_la_SOURCES += \
389 vnet/devices/dpdk/ipsec/esp_encrypt.c \
390 vnet/devices/dpdk/ipsec/esp_decrypt.c \
391 vnet/devices/dpdk/ipsec/crypto_node.c \
392 vnet/devices/dpdk/ipsec/cli.c \
393 vnet/devices/dpdk/ipsec/ipsec.c
394endif
395endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700396
Damjan Marione936bbe2016-02-25 23:17:38 +0100397libvnet_la_SOURCES += \
398 vnet/ipsec/ipsec_output.c
399
Ed Warnickecb9cada2015-12-08 15:45:58 -0700400nobase_include_HEADERS += \
401 vnet/ipsec/ipsec.h \
402 vnet/ipsec/esp.h \
403 vnet/ipsec/ikev2.h \
404 vnet/ipsec/ikev2_priv.h
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000405if WITH_DPDK_CRYPTO
406nobase_include_HEADERS += \
407 vnet/devices/dpdk/ipsec/ipsec.h \
408 vnet/devices/dpdk/ipsec/esp.h
409endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700410
411########################################
412# Layer 3 protocol: osi
413########################################
414libvnet_la_SOURCES += \
415 vnet/osi/node.c \
416 vnet/osi/osi.c \
417 vnet/osi/pg.c
418
419nobase_include_HEADERS += \
420 vnet/osi/osi.h
421
422########################################
423# Layer 3 protocol: MAP
424########################################
Ole Troanf0c90e22016-12-06 12:50:08 +0100425libvnet_la_SOURCES += \
426 vnet/map/map.c \
427 vnet/map/map_dpo.c \
428 vnet/map/ip4_map.c \
429 vnet/map/ip6_map.c \
430 vnet/map/ip4_map_t.c \
431 vnet/map/ip6_map_t.c \
432 vnet/map/map_api.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700433
Ole Troanf0c90e22016-12-06 12:50:08 +0100434nobase_include_HEADERS += \
435 vnet/map/map.h \
436 vnet/map/map_dpo.h \
437 vnet/map/map.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700438
Ole Troand575e692016-08-25 12:26:47 +0200439if ENABLE_TESTS
440TESTS += test_map
441test_map_SOURCES = \
442 vnet/map/test.c
443test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
444
445test_map_LDADD = libvnet.la -lvppinfra -lvlib \
446 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
447 -ldl -lsvm -lrt
448
449test_map_LDFLAGS = -static
450endif
451
452
Ed Warnickecb9cada2015-12-08 15:45:58 -0700453########################################
454# Tunnel protocol: gre
455########################################
456libvnet_la_SOURCES += \
457 vnet/gre/gre.c \
458 vnet/gre/node.c \
459 vnet/gre/interface.c \
460 vnet/gre/pg.c
461
462nobase_include_HEADERS += \
463 vnet/gre/gre.h \
464 vnet/gre/packet.h \
465 vnet/gre/error.def
466
467########################################
468# Tunnel protocol: l2tpv3
469########################################
470libvnet_la_SOURCES += \
471 vnet/l2tp/l2tp.c \
472 vnet/l2tp/encap.c \
473 vnet/l2tp/decap.c \
474 vnet/l2tp/pg.c
475
476nobase_include_HEADERS += \
477 vnet/l2tp/l2tp.h \
478 vnet/l2tp/packet.h
479
480########################################
481# Tunnel protocol: gre+mpls
482########################################
483libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100484 vnet/mpls/mpls.c \
485 vnet/mpls/mpls_lookup.c \
486 vnet/mpls/mpls_output.c \
487 vnet/mpls/mpls_features.c \
488 vnet/mpls/node.c \
489 vnet/mpls/interface.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000490 vnet/mpls/mpls_tunnel.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100491 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700492
493nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100494 vnet/mpls/mpls.h \
495 vnet/mpls/mpls_types.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000496 vnet/mpls/mpls_tunnel.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100497 vnet/mpls/packet.h \
498 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700499
500
501########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700502# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700503########################################
504
505libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700506 vnet/vxlan-gpe/vxlan_gpe.c \
507 vnet/vxlan-gpe/encap.c \
508 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700509
510nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700511 vnet/vxlan-gpe/vxlan_gpe.h \
512 vnet/vxlan-gpe/vxlan_gpe_packet.h \
513 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700514
515########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700516# Tunnel protocol: ipsec+gre
517########################################
518libvnet_la_SOURCES += \
519 vnet/ipsec-gre/ipsec_gre.c \
520 vnet/ipsec-gre/node.c \
521 vnet/ipsec-gre/interface.c
522
523nobase_include_HEADERS += \
524 vnet/ipsec-gre/ipsec_gre.h \
525 vnet/ipsec-gre/error.def
526
527########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100528# LISP control plane: lisp-cp
529########################################
530
531libvnet_la_SOURCES += \
532 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100533 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100534 vnet/lisp-cp/control.c \
535 vnet/lisp-cp/gid_dictionary.c \
536 vnet/lisp-cp/lisp_msg_serdes.c \
537 vnet/lisp-cp/packets.c
538
539nobase_include_HEADERS += \
540 vnet/lisp-cp/lisp_types.h \
541 vnet/lisp-cp/packets.h \
542 vnet/lisp-cp/gid_dictionary.h \
543 vnet/lisp-cp/lisp_cp_messages.h \
544 vnet/lisp-cp/lisp_msg_serdes.h \
545 vnet/lisp-cp/control.h
546
Filip Tehlar254b0362016-04-07 10:04:34 +0200547
548if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200549LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200550 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
551
552TESTS += test_cp_serdes test_lisp_types
553
554test_cp_serdes_SOURCES = \
555 test/lisp-cp/test_cp_serdes.c \
556 vnet/lisp-cp/lisp_msg_serdes.c \
557 vnet/lisp-cp/lisp_types.c \
558 vnet/lisp-cp/packets.c \
559 vnet/ip/ip_checksum.c
560
561test_lisp_types_SOURCES = \
562 test/lisp-cp/test_lisp_types.c \
563 vnet/lisp-cp/lisp_types.c
564
565test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
566test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
567
568test_cp_serdes_LDADD = libvnet.la $(LDS)
569test_lisp_types_LDADD = libvnet.la $(LDS)
570
571test_cp_serdes_LDFLAGS = -static
572test_lisp_types_LDFLAGS = -static
573endif
574
Florin Corase127a7e2016-02-18 22:20:01 +0100575########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700576# Tunnel protocol: lisp-gpe
577########################################
578
579libvnet_la_SOURCES += \
580 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100581 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
582 vnet/lisp-gpe/lisp_gpe_adjacency.c \
583 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100584 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
585 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200586 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100587 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700588
589nobase_include_HEADERS += \
590 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100591 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
592 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700593 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100594 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700595
Filip Tehlar254b0362016-04-07 10:04:34 +0200596if ENABLE_TESTS
597TESTS += test_test
598
599test_test_SOURCES = test/lisp-gpe/test.c
600
601test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
602
603test_test_LDADD = $(LIBOBJS)
604
605noinst_PROGRAMS += $(TESTS)
606check_PROGRAMS = $(TESTS)
607endif
608
Ed Warnickecb9cada2015-12-08 15:45:58 -0700609########################################
610# DHCP client
611########################################
612libvnet_la_SOURCES += \
613 vnet/dhcp/client.c \
614 vnet/dhcp/client.h
615
616nobase_include_HEADERS += \
617 vnet/dhcp/client.h
618
619########################################
620# DHCP proxy
621########################################
622libvnet_la_SOURCES += \
623 vnet/dhcp/proxy_node.c \
624 vnet/dhcp/proxy.h
625
626nobase_include_HEADERS += \
627 vnet/dhcp/packet.h \
628 vnet/dhcp/proxy.h \
629 vnet/dhcp/proxy_error.def
630
631########################################
632# ipv6 segment routing
633########################################
Dave Barach61efa142016-01-22 08:23:09 -0500634
635if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700636libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700637 vnet/sr/sr.c \
638 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500639endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700640
641nobase_include_HEADERS += \
642 vnet/sr/sr_packet.h \
643 vnet/sr/sr_error.def \
644 vnet/sr/sr.h
645
646########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700647# DHCPv6 proxy
648########################################
649libvnet_la_SOURCES += \
650 vnet/dhcpv6/proxy_node.c
651
652nobase_include_HEADERS += \
653 vnet/dhcpv6/packet.h \
654 vnet/dhcpv6/proxy.h \
655 vnet/dhcpv6/proxy_error.def
656
657########################################
658# IPFIX / netflow v10
659########################################
660libvnet_la_SOURCES += \
661 vnet/flow/flow_report.c
662
663nobase_include_HEADERS += \
664 vnet/flow/flow_report.h \
665 vnet/flow/ipfix_info_elements.h \
666 vnet/flow/ipfix_packet.h
667
668########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700669# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700670########################################
671
672libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700673 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700674
675nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700676 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700677
678########################################
679# lawful intercept
680########################################
681
682libvnet_la_SOURCES += \
683 vnet/lawful-intercept/lawful_intercept.c \
684 vnet/lawful-intercept/node.c
685
686nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700687 vnet/lawful-intercept/lawful_intercept.h
688
689########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100690# SPAN (port mirroring)
691########################################
692
693libvnet_la_SOURCES += \
Pavel Kotucek3a2a1c42016-12-06 10:10:10 +0100694 vnet/span/span_api.c \
695 vnet/span/span.c \
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100696 vnet/span/node.c
697
698nobase_include_HEADERS += \
Pavel Kotucek3a2a1c42016-12-06 10:10:10 +0100699 vnet/span/span.api.h \
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100700 vnet/span/span.h
701
702########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700703# Packet generator
704########################################
705
706libvnet_la_SOURCES += \
707 vnet/pg/cli.c \
708 vnet/pg/edit.c \
709 vnet/pg/init.c \
710 vnet/pg/input.c \
711 vnet/pg/output.c \
712 vnet/pg/stream.c
713
714nobase_include_HEADERS += \
715 vnet/pg/pg.h \
716 vnet/pg/edit.h
717
718########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000719# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700720########################################
721if WITH_DPDK
722libvnet_la_SOURCES += \
723 vnet/devices/dpdk/dpdk_priv.h \
724 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100725 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700726 vnet/devices/dpdk/init.c \
727 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100728 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700729 vnet/devices/dpdk/cli.c
730
731nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200732 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200733else
734libvnet_la_SOURCES += \
735 vnet/devices/nic/ixge.c \
736 vnet/devices/nic/ixge.h \
737 vnet/devices/nic/sfp.c \
738 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700739endif
740
741########################################
742# virtio
743########################################
744
Ed Warnickecb9cada2015-12-08 15:45:58 -0700745libvnet_la_SOURCES += \
746 vnet/devices/virtio/vhost-user.c
747
748nobase_include_HEADERS += \
749 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700750
751########################################
752# ssvm ethernet
753########################################
754libvnet_la_SOURCES += \
755 vnet/devices/ssvm/ssvm_eth.c \
756 vnet/devices/ssvm/node.c
757
758nobase_include_HEADERS += \
759 vnet/devices/ssvm/ssvm_eth.h
760
761########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100762# Linux packet interface
763########################################
764
765libvnet_la_SOURCES += \
766 vnet/devices/af_packet/af_packet.c \
767 vnet/devices/af_packet/device.c \
768 vnet/devices/af_packet/node.c \
769 vnet/devices/af_packet/cli.c
770
771nobase_include_HEADERS += \
772 vnet/devices/af_packet/af_packet.h
773
774########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200775# NETMAP interface
776########################################
777
778libvnet_la_SOURCES += \
779 vnet/devices/netmap/netmap.c \
780 vnet/devices/netmap/device.c \
781 vnet/devices/netmap/node.c \
782 vnet/devices/netmap/cli.c
783
784nobase_include_HEADERS += \
785 vnet/devices/netmap/netmap.h
786
787
788########################################
Damjan Marion22311502016-10-28 20:30:15 +0200789# Driver feature graph arc support
790########################################
791
792libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200793 vnet/feature/feature.c \
794 vnet/feature/registration.c
795
796nobase_include_HEADERS += \
797 vnet/feature/feature.h
798
799########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700800# Unix kernel related
801########################################
802
803# FIXME: vnet/unix/hgshm.c
804
805libvnet_la_SOURCES += \
806 vnet/unix/gdb_funcs.c \
807 vnet/unix/pcap.c \
Dave Barach496e1272016-12-07 09:15:58 -0500808 vnet/unix/tap_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700809 vnet/unix/tapcli.c \
810 vnet/unix/tuntap.c
811
812nobase_include_HEADERS += \
813 vnet/unix/pcap.h \
814 vnet/unix/tuntap.h \
Dave Barach496e1272016-12-07 09:15:58 -0500815 vnet/unix/tap.api.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700816 vnet/unix/tapcli.h
817
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400818########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100819# FIB
820########################################
821
822libvnet_la_SOURCES += \
823 vnet/fib/fib.c \
824 vnet/fib/fib_test.c \
825 vnet/fib/ip4_fib.c \
826 vnet/fib/ip6_fib.c \
827 vnet/fib/mpls_fib.c \
828 vnet/fib/fib_table.c \
829 vnet/fib/fib_walk.c \
830 vnet/fib/fib_types.c \
831 vnet/fib/fib_node.c \
832 vnet/fib/fib_node_list.c \
833 vnet/fib/fib_entry.c \
834 vnet/fib/fib_entry_src.c \
835 vnet/fib/fib_entry_src_rr.c \
836 vnet/fib/fib_entry_src_interface.c \
837 vnet/fib/fib_entry_src_default_route.c \
838 vnet/fib/fib_entry_src_special.c \
839 vnet/fib/fib_entry_src_api.c \
840 vnet/fib/fib_entry_src_adj.c \
841 vnet/fib/fib_entry_src_mpls.c \
842 vnet/fib/fib_entry_src_lisp.c \
843 vnet/fib/fib_entry_cover.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000844 vnet/fib/fib_entry_delegate.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100845 vnet/fib/fib_path_list.c \
846 vnet/fib/fib_path.c \
847 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100848 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100849 vnet/fib/fib_attached_export.c
850
851nobase_include_HEADERS += \
852 vnet/fib/fib.h \
Dave Barachb5e8a772016-12-06 12:04:42 -0500853 vnet/fib/fib_api.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100854 vnet/fib/ip4_fib.h \
855 vnet/fib/ip6_fib.h \
856 vnet/fib/fib_types.h \
857 vnet/fib/fib_table.h \
858 vnet/fib/fib_node.h \
859 vnet/fib/fib_node_list.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000860 vnet/fib/fib_entry.h \
861 vnet/fib/fib_entry_delegate.h
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100862
863########################################
864# ADJ
865########################################
866
867libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100868 vnet/adj/adj_nbr.c \
869 vnet/adj/adj_rewrite.c \
870 vnet/adj/adj_glean.c \
871 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100872 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100873 vnet/adj/adj.c
874
875nobase_include_HEADERS += \
876 vnet/adj/adj.h \
877 vnet/adj/adj_types.h \
878 vnet/adj/adj_rewrite.h \
879 vnet/adj/adj_glean.h \
880 vnet/adj/adj_nbr.h
881
882########################################
883# Data-Plane Objects
884########################################
885
886libvnet_la_SOURCES += \
887 vnet/dpo/dpo.c \
888 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100889 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100890 vnet/dpo/punt_dpo.c \
891 vnet/dpo/receive_dpo.c \
892 vnet/dpo/load_balance.c \
893 vnet/dpo/load_balance_map.c \
894 vnet/dpo/lookup_dpo.c \
895 vnet/dpo/classify_dpo.c \
896 vnet/dpo/mpls_label_dpo.c
897
898nobase_include_HEADERS += \
899 vnet/dpo/load_balance.h \
900 vnet/dpo/drop_dpo.h \
901 vnet/dpo/lookup_dpo.h \
902 vnet/dpo/punt_dpo.h \
903 vnet/dpo/classify_dpo.h \
904 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100905 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100906 vnet/dpo/dpo.h
907
908########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400909# Plugin client library
910########################################
911
912libvnetplugin_la_SOURCES += \
913 vnet/plugin/p1.c
914
915nobase_include_HEADERS += \
916 vnet/plugin/plugin.h
917
918lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700919
Ed Warnickecb9cada2015-12-08 15:45:58 -0700920pcap2pg_SOURCES = \
921 vnet/unix/pcap2pg.c \
922 vnet/unix/pcap.h
923
924pcap2pg_LDFLAGS = -static
925pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
926
927noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400928
929# Set the suffix list
Ole Troanf14e3bf2016-12-01 21:49:03 +0100930SUFFIXES = .api.h .api .api.json
Dave Barachaff70772016-10-31 11:59:07 -0400931
932# install the API definition, so we can produce java bindings, etc.
933
Ole Troanf14e3bf2016-12-01 21:49:03 +0100934apidir = $(prefix)/vnet
Dave Barachb5e8a772016-12-06 12:04:42 -0500935
Ole Troanf0c90e22016-12-06 12:50:08 +0100936api_DATA = \
937 vnet/interface.api.json \
Dave Barachb5e8a772016-12-06 12:04:42 -0500938 vnet/ip/ip.api.json \
Ole Troanf0c90e22016-12-06 12:50:08 +0100939 vnet/l2/l2.api.json \
Ole Troan399ca1c2016-12-06 23:00:38 +0100940 vnet/map/map.api.json \
Dave Barach496e1272016-12-07 09:15:58 -0500941 vnet/span/span.api.json \
942 vnet/unix/tap.api.json
Dave Barachaff70772016-10-31 11:59:07 -0400943
944# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
945# and requires a symbolic link at the top of the vnet source tree
946
947include $(top_srcdir)/suffix-rules.mk