blob: 930d6bb927851a1893b6972f131f051ca406134d [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 \
28 vnet/span/span.api.json
Dave Barachaff70772016-10-31 11:59:07 -040029
Ed Warnickecb9cada2015-12-08 15:45:58 -070030libvnet_la_SOURCES =
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -040031libvnetplugin_la_SOURCES =
Ed Warnickecb9cada2015-12-08 15:45:58 -070032nobase_include_HEADERS =
Dave Barach4e281a42015-12-14 11:13:29 -050033noinst_PROGRAMS =
Filip Tehlar254b0362016-04-07 10:04:34 +020034TESTS =
Ed Warnickecb9cada2015-12-08 15:45:58 -070035
Ole Troand575e692016-08-25 12:26:47 +020036dpdk_libs =
37if WITH_DPDK
38dpdk_libs += -l:libdpdk.a
39endif
40
Ed Warnickecb9cada2015-12-08 15:45:58 -070041########################################
42# Generic stuff
43########################################
44libvnet_la_SOURCES += \
45 vnet/config.c \
Damjan Marion51327ac2016-11-09 11:59:42 +010046 vnet/devices/devices.c \
Damjan Marion0247b462016-06-08 01:37:11 +020047 vnet/handoff.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070048 vnet/interface.c \
Dave Barachaff70772016-10-31 11:59:07 -040049 vnet/interface_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070050 vnet/interface_cli.c \
51 vnet/interface_format.c \
52 vnet/interface_output.c \
53 vnet/misc.c \
54 vnet/replication.c \
55 vnet/rewrite.c
56
57nobase_include_HEADERS += \
58 vnet/api_errno.h \
59 vnet/buffer.h \
60 vnet/config.h \
Damjan Marion8bdc63b2016-11-02 14:48:21 +010061 vnet/devices/devices.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070062 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020063 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070064 vnet/interface.h \
Dave Barachaff70772016-10-31 11:59:07 -040065 vnet/interface.api.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070066 vnet/interface_funcs.h \
67 vnet/l3_types.h \
68 vnet/pipeline.h \
69 vnet/replication.h \
70 vnet/rewrite.h \
Dave Barachaff70772016-10-31 11:59:07 -040071 vnet/vnet.h \
72 vnet/vnet_all_api_h.h \
73 vnet/vnet_msg_enum.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070074
75########################################
76# Policer infra
77########################################
78
79libvnet_la_SOURCES += \
80 vnet/policer/node_funcs.c \
81 vnet/policer/policer.c \
82 vnet/policer/xlate.c
83
84nobase_include_HEADERS += \
85 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070086 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070087 vnet/policer/xlate.h
88
Dave Barachc07bf5d2016-02-17 17:52:26 -050089########################################
90# Cop - junk filter
91########################################
92
93libvnet_la_SOURCES += \
94 vnet/cop/cop.c \
95 vnet/cop/node1.c \
96 vnet/cop/ip4_whitelist.c \
97 vnet/cop/ip6_whitelist.c
98
99nobase_include_HEADERS += \
100 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700101
102########################################
103# Layer 2 protocols go here
104########################################
105
106########################################
107# Layer 2 protocol: Ethernet
108########################################
109libvnet_la_SOURCES += \
110 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700111 vnet/ethernet/format.c \
112 vnet/ethernet/init.c \
113 vnet/ethernet/interface.c \
114 vnet/ethernet/node.c \
115 vnet/ethernet/pg.c
116
117nobase_include_HEADERS += \
118 vnet/ethernet/arp_packet.h \
119 vnet/ethernet/error.def \
120 vnet/ethernet/ethernet.h \
121 vnet/ethernet/packet.h \
122 vnet/ethernet/types.def
123
124########################################
125# Layer 2 protocol: Ethernet bridging
126########################################
127libvnet_la_SOURCES += \
128 vnet/l2/feat_bitmap.c \
Matus Fabianf468e232016-12-02 06:00:53 -0800129 vnet/l2/l2_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700130 vnet/l2/l2_bd.c \
131 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400132 vnet/l2/l2_input_classify.c \
133 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700134 vnet/l2/l2_efp_filter.c \
135 vnet/l2/l2_fib.c \
136 vnet/l2/l2_flood.c \
137 vnet/l2/l2_fwd.c \
138 vnet/l2/l2_input_acl.c \
139 vnet/l2/l2_input.c \
140 vnet/l2/l2_input_vtr.c \
141 vnet/l2/l2_learn.c \
142 vnet/l2/l2_output_acl.c \
143 vnet/l2/l2_output.c \
144 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000145 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700146 vnet/l2/l2_vtr.c \
147 vnet/l2/l2_xcrw.c
148
149nobase_include_HEADERS += \
150 vnet/l2/feat_bitmap.h \
151 vnet/l2/l2_input.h \
152 vnet/l2/l2_output.h \
153 vnet/l2/l2_vtr.h \
154 vnet/l2/l2_input_vtr.h \
155 vnet/l2/l2_efp_filter.h \
156 vnet/l2/l2_fwd.h \
157 vnet/l2/l2_bd.h \
158 vnet/l2/l2_bvi.h \
159 vnet/l2/l2_flood.h \
160 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000161 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700162 vnet/l2/l2_xcrw.h \
Matus Fabianf468e232016-12-02 06:00:53 -0800163 vnet/l2/l2_classify.h \
164 vnet/l2/l2.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700165
166########################################
167# Layer 2 protocol: SRP
168########################################
169libvnet_la_SOURCES += \
170 vnet/srp/format.c \
171 vnet/srp/interface.c \
172 vnet/srp/node.c \
173 vnet/srp/pg.c
174
175nobase_include_HEADERS += \
176 vnet/srp/packet.h \
177 vnet/srp/srp.h
178
179########################################
180# Layer 2 protocol: PPP
181########################################
182libvnet_la_SOURCES += \
183 vnet/ppp/node.c \
184 vnet/ppp/pg.c \
185 vnet/ppp/ppp.c
186
187nobase_include_HEADERS += \
188 vnet/ppp/error.def \
189 vnet/ppp/ppp.h \
190 vnet/ppp/packet.h
191
192########################################
193# Layer 2 protocol: HDLC
194########################################
195libvnet_la_SOURCES += \
196 vnet/hdlc/node.c \
197 vnet/hdlc/pg.c \
198 vnet/hdlc/hdlc.c
199
200nobase_include_HEADERS += \
201 vnet/hdlc/error.def \
202 vnet/hdlc/hdlc.h \
203 vnet/hdlc/packet.h
204
205########################################
206# Layer 2 protocol: LLC
207########################################
208libvnet_la_SOURCES += \
209 vnet/llc/llc.c \
210 vnet/llc/node.c \
211 vnet/llc/pg.c
212
213nobase_include_HEADERS += \
214 vnet/llc/llc.h
215
216########################################
217# Layer 2 protocol: SNAP
218########################################
219libvnet_la_SOURCES += \
220 vnet/snap/snap.c \
221 vnet/snap/node.c \
222 vnet/snap/pg.c
223
224nobase_include_HEADERS += \
225 vnet/snap/snap.h
226
227########################################
228# Layer 2 / vxlan
229########################################
230libvnet_la_SOURCES += \
231 vnet/vxlan/vxlan.c \
232 vnet/vxlan/encap.c \
233 vnet/vxlan/decap.c
234
235nobase_include_HEADERS += \
236 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500237 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700238 vnet/vxlan/vxlan_error.def
239
240########################################
Dave Barachced48e72016-02-08 15:57:35 -0500241# Layer 2 / CDP
242########################################
243libvnet_la_SOURCES += \
244 vnet/cdp/cdp_input.c \
245 vnet/cdp/cdp_node.c \
246 vnet/cdp/cdp_periodic.c
247
248nobase_include_HEADERS += \
249 vnet/cdp/cdp_protocol.h
250
251########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200252# Layer 2 / LLDP
253########################################
254libvnet_la_SOURCES += \
255 vnet/lldp/lldp_input.c \
256 vnet/lldp/lldp_node.c \
257 vnet/lldp/lldp_output.c \
258 vnet/lldp/lldp_cli.c
259
260nobase_include_HEADERS += \
261 vnet/lldp/lldp_protocol.h
262
263########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700264# Layer 2/3 "classify"
265########################################
266libvnet_la_SOURCES += \
267 vnet/classify/vnet_classify.c \
268 vnet/classify/ip_classify.c \
269 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700270 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700271 vnet/classify/flow_classify.c \
272 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700273 vnet/classify/vnet_classify.h
274
275nobase_include_HEADERS += \
276 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700277 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700278 vnet/classify/policer_classify.h \
279 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700280
281########################################
282# Layer 3 protocols go here
283########################################
284
Ed Warnickecb9cada2015-12-08 15:45:58 -0700285########################################
286# Layer 3 protocol: IP v4/v6
287########################################
288libvnet_la_SOURCES += \
289 vnet/ip/format.c \
290 vnet/ip/icmp4.c \
291 vnet/ip/icmp6.c \
292 vnet/ip/ip46_cli.c \
293 vnet/ip/ip4_format.c \
294 vnet/ip/ip4_forward.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700295 vnet/ip/ip4_input.c \
296 vnet/ip/ip4_mtrie.c \
297 vnet/ip/ip4_pg.c \
Dave Barach6f9bca22016-04-30 10:25:32 -0400298 vnet/ip/ip4_source_and_port_range_check.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200299 vnet/ip/ip4_source_check.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700300 vnet/ip/ip6_format.c \
301 vnet/ip/ip6_forward.c \
302 vnet/ip/ip6_hop_by_hop.c \
303 vnet/ip/ip6_input.c \
304 vnet/ip/ip6_neighbor.c \
305 vnet/ip/ip6_pg.c \
Dave Barachb5e8a772016-12-06 12:04:42 -0500306 vnet/ip/ip_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700307 vnet/ip/ip_checksum.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200308 vnet/ip/ip_frag.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700309 vnet/ip/ip.h \
310 vnet/ip/ip_init.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200311 vnet/ip/ip_input_acl.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700312 vnet/ip/lookup.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200313 vnet/ip/ping.c \
314 vnet/ip/punt.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700315 vnet/ip/udp_format.c \
316 vnet/ip/udp_init.c \
317 vnet/ip/udp_local.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200318 vnet/ip/udp_pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700319
320nobase_include_HEADERS += \
321 vnet/ip/format.h \
322 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100323 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700324 vnet/ip/icmp6.h \
325 vnet/ip/igmp_packet.h \
Dave Barachb5e8a772016-12-06 12:04:42 -0500326 vnet/ip/ip.api.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200327 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700328 vnet/ip/ip4.h \
329 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700330 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700331 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200332 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700333 vnet/ip/ip6_hop_by_hop.h \
334 vnet/ip/ip6_hop_by_hop_packet.h \
335 vnet/ip/ip6_packet.h \
Pavel Kotucek3e046ea2016-12-05 08:27:37 +0100336 vnet/ip/ip6_neighbor.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200337 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700338 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200339 vnet/ip/ip_source_and_port_range_check.h \
340 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700341 vnet/ip/ports.def \
342 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700343 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200344 vnet/ip/punt.h \
345 vnet/ip/tcp_packet.h \
346 vnet/ip/udp_error.def \
347 vnet/ip/udp.h \
348 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700349
350########################################
351# Layer 3 protocol: IPSec
352########################################
Dave Barach61efa142016-01-22 08:23:09 -0500353if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700354libvnet_la_SOURCES += \
355 vnet/ipsec/ipsec.c \
356 vnet/ipsec/ipsec_cli.c \
357 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700358 vnet/ipsec/ipsec_input.c \
359 vnet/ipsec/ipsec_if.c \
360 vnet/ipsec/ipsec_if_in.c \
361 vnet/ipsec/ipsec_if_out.c \
362 vnet/ipsec/esp_encrypt.c \
363 vnet/ipsec/esp_decrypt.c \
364 vnet/ipsec/ikev2.c \
365 vnet/ipsec/ikev2_crypto.c \
366 vnet/ipsec/ikev2_cli.c \
367 vnet/ipsec/ikev2_payload.c \
368 vnet/ipsec/ikev2_format.c
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000369if WITH_DPDK_CRYPTO
370libvnet_la_SOURCES += \
371 vnet/devices/dpdk/ipsec/esp_encrypt.c \
372 vnet/devices/dpdk/ipsec/esp_decrypt.c \
373 vnet/devices/dpdk/ipsec/crypto_node.c \
374 vnet/devices/dpdk/ipsec/cli.c \
375 vnet/devices/dpdk/ipsec/ipsec.c
376endif
377endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700378
Damjan Marione936bbe2016-02-25 23:17:38 +0100379libvnet_la_SOURCES += \
380 vnet/ipsec/ipsec_output.c
381
Ed Warnickecb9cada2015-12-08 15:45:58 -0700382nobase_include_HEADERS += \
383 vnet/ipsec/ipsec.h \
384 vnet/ipsec/esp.h \
385 vnet/ipsec/ikev2.h \
386 vnet/ipsec/ikev2_priv.h
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000387if WITH_DPDK_CRYPTO
388nobase_include_HEADERS += \
389 vnet/devices/dpdk/ipsec/ipsec.h \
390 vnet/devices/dpdk/ipsec/esp.h
391endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700392
393########################################
394# Layer 3 protocol: osi
395########################################
396libvnet_la_SOURCES += \
397 vnet/osi/node.c \
398 vnet/osi/osi.c \
399 vnet/osi/pg.c
400
401nobase_include_HEADERS += \
402 vnet/osi/osi.h
403
404########################################
405# Layer 3 protocol: MAP
406########################################
Ole Troanf0c90e22016-12-06 12:50:08 +0100407libvnet_la_SOURCES += \
408 vnet/map/map.c \
409 vnet/map/map_dpo.c \
410 vnet/map/ip4_map.c \
411 vnet/map/ip6_map.c \
412 vnet/map/ip4_map_t.c \
413 vnet/map/ip6_map_t.c \
414 vnet/map/map_api.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700415
Ole Troanf0c90e22016-12-06 12:50:08 +0100416nobase_include_HEADERS += \
417 vnet/map/map.h \
418 vnet/map/map_dpo.h \
419 vnet/map/map.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700420
Ole Troand575e692016-08-25 12:26:47 +0200421if ENABLE_TESTS
422TESTS += test_map
423test_map_SOURCES = \
424 vnet/map/test.c
425test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
426
427test_map_LDADD = libvnet.la -lvppinfra -lvlib \
428 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
429 -ldl -lsvm -lrt
430
431test_map_LDFLAGS = -static
432endif
433
434
Ed Warnickecb9cada2015-12-08 15:45:58 -0700435########################################
436# Tunnel protocol: gre
437########################################
438libvnet_la_SOURCES += \
439 vnet/gre/gre.c \
440 vnet/gre/node.c \
441 vnet/gre/interface.c \
442 vnet/gre/pg.c
443
444nobase_include_HEADERS += \
445 vnet/gre/gre.h \
446 vnet/gre/packet.h \
447 vnet/gre/error.def
448
449########################################
450# Tunnel protocol: l2tpv3
451########################################
452libvnet_la_SOURCES += \
453 vnet/l2tp/l2tp.c \
454 vnet/l2tp/encap.c \
455 vnet/l2tp/decap.c \
456 vnet/l2tp/pg.c
457
458nobase_include_HEADERS += \
459 vnet/l2tp/l2tp.h \
460 vnet/l2tp/packet.h
461
462########################################
463# Tunnel protocol: gre+mpls
464########################################
465libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100466 vnet/mpls/mpls.c \
467 vnet/mpls/mpls_lookup.c \
468 vnet/mpls/mpls_output.c \
469 vnet/mpls/mpls_features.c \
470 vnet/mpls/node.c \
471 vnet/mpls/interface.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000472 vnet/mpls/mpls_tunnel.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100473 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700474
475nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100476 vnet/mpls/mpls.h \
477 vnet/mpls/mpls_types.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000478 vnet/mpls/mpls_tunnel.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100479 vnet/mpls/packet.h \
480 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700481
482
483########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700484# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700485########################################
486
487libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700488 vnet/vxlan-gpe/vxlan_gpe.c \
489 vnet/vxlan-gpe/encap.c \
490 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700491
492nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700493 vnet/vxlan-gpe/vxlan_gpe.h \
494 vnet/vxlan-gpe/vxlan_gpe_packet.h \
495 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700496
497########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700498# Tunnel protocol: ipsec+gre
499########################################
500libvnet_la_SOURCES += \
501 vnet/ipsec-gre/ipsec_gre.c \
502 vnet/ipsec-gre/node.c \
503 vnet/ipsec-gre/interface.c
504
505nobase_include_HEADERS += \
506 vnet/ipsec-gre/ipsec_gre.h \
507 vnet/ipsec-gre/error.def
508
509########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100510# LISP control plane: lisp-cp
511########################################
512
513libvnet_la_SOURCES += \
514 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100515 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100516 vnet/lisp-cp/control.c \
517 vnet/lisp-cp/gid_dictionary.c \
518 vnet/lisp-cp/lisp_msg_serdes.c \
519 vnet/lisp-cp/packets.c
520
521nobase_include_HEADERS += \
522 vnet/lisp-cp/lisp_types.h \
523 vnet/lisp-cp/packets.h \
524 vnet/lisp-cp/gid_dictionary.h \
525 vnet/lisp-cp/lisp_cp_messages.h \
526 vnet/lisp-cp/lisp_msg_serdes.h \
527 vnet/lisp-cp/control.h
528
Filip Tehlar254b0362016-04-07 10:04:34 +0200529
530if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200531LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200532 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
533
534TESTS += test_cp_serdes test_lisp_types
535
536test_cp_serdes_SOURCES = \
537 test/lisp-cp/test_cp_serdes.c \
538 vnet/lisp-cp/lisp_msg_serdes.c \
539 vnet/lisp-cp/lisp_types.c \
540 vnet/lisp-cp/packets.c \
541 vnet/ip/ip_checksum.c
542
543test_lisp_types_SOURCES = \
544 test/lisp-cp/test_lisp_types.c \
545 vnet/lisp-cp/lisp_types.c
546
547test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
548test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
549
550test_cp_serdes_LDADD = libvnet.la $(LDS)
551test_lisp_types_LDADD = libvnet.la $(LDS)
552
553test_cp_serdes_LDFLAGS = -static
554test_lisp_types_LDFLAGS = -static
555endif
556
Florin Corase127a7e2016-02-18 22:20:01 +0100557########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700558# Tunnel protocol: lisp-gpe
559########################################
560
561libvnet_la_SOURCES += \
562 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100563 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
564 vnet/lisp-gpe/lisp_gpe_adjacency.c \
565 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100566 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
567 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200568 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100569 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700570
571nobase_include_HEADERS += \
572 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100573 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
574 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700575 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100576 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700577
Filip Tehlar254b0362016-04-07 10:04:34 +0200578if ENABLE_TESTS
579TESTS += test_test
580
581test_test_SOURCES = test/lisp-gpe/test.c
582
583test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
584
585test_test_LDADD = $(LIBOBJS)
586
587noinst_PROGRAMS += $(TESTS)
588check_PROGRAMS = $(TESTS)
589endif
590
Ed Warnickecb9cada2015-12-08 15:45:58 -0700591########################################
592# DHCP client
593########################################
594libvnet_la_SOURCES += \
595 vnet/dhcp/client.c \
596 vnet/dhcp/client.h
597
598nobase_include_HEADERS += \
599 vnet/dhcp/client.h
600
601########################################
602# DHCP proxy
603########################################
604libvnet_la_SOURCES += \
605 vnet/dhcp/proxy_node.c \
606 vnet/dhcp/proxy.h
607
608nobase_include_HEADERS += \
609 vnet/dhcp/packet.h \
610 vnet/dhcp/proxy.h \
611 vnet/dhcp/proxy_error.def
612
613########################################
614# ipv6 segment routing
615########################################
Dave Barach61efa142016-01-22 08:23:09 -0500616
617if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700618libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700619 vnet/sr/sr.c \
620 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500621endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700622
623nobase_include_HEADERS += \
624 vnet/sr/sr_packet.h \
625 vnet/sr/sr_error.def \
626 vnet/sr/sr.h
627
628########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700629# DHCPv6 proxy
630########################################
631libvnet_la_SOURCES += \
632 vnet/dhcpv6/proxy_node.c
633
634nobase_include_HEADERS += \
635 vnet/dhcpv6/packet.h \
636 vnet/dhcpv6/proxy.h \
637 vnet/dhcpv6/proxy_error.def
638
639########################################
640# IPFIX / netflow v10
641########################################
642libvnet_la_SOURCES += \
643 vnet/flow/flow_report.c
644
645nobase_include_HEADERS += \
646 vnet/flow/flow_report.h \
647 vnet/flow/ipfix_info_elements.h \
648 vnet/flow/ipfix_packet.h
649
650########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700651# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700652########################################
653
654libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700655 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700656
657nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700658 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700659
660########################################
661# lawful intercept
662########################################
663
664libvnet_la_SOURCES += \
665 vnet/lawful-intercept/lawful_intercept.c \
666 vnet/lawful-intercept/node.c
667
668nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700669 vnet/lawful-intercept/lawful_intercept.h
670
671########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100672# SPAN (port mirroring)
673########################################
674
675libvnet_la_SOURCES += \
Pavel Kotucek3a2a1c42016-12-06 10:10:10 +0100676 vnet/span/span_api.c \
677 vnet/span/span.c \
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100678 vnet/span/node.c
679
680nobase_include_HEADERS += \
Pavel Kotucek3a2a1c42016-12-06 10:10:10 +0100681 vnet/span/span.api.h \
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100682 vnet/span/span.h
683
684########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700685# Packet generator
686########################################
687
688libvnet_la_SOURCES += \
689 vnet/pg/cli.c \
690 vnet/pg/edit.c \
691 vnet/pg/init.c \
692 vnet/pg/input.c \
693 vnet/pg/output.c \
694 vnet/pg/stream.c
695
696nobase_include_HEADERS += \
697 vnet/pg/pg.h \
698 vnet/pg/edit.h
699
700########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000701# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700702########################################
703if WITH_DPDK
704libvnet_la_SOURCES += \
705 vnet/devices/dpdk/dpdk_priv.h \
706 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100707 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700708 vnet/devices/dpdk/init.c \
709 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100710 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700711 vnet/devices/dpdk/cli.c
712
713nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200714 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200715else
716libvnet_la_SOURCES += \
717 vnet/devices/nic/ixge.c \
718 vnet/devices/nic/ixge.h \
719 vnet/devices/nic/sfp.c \
720 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700721endif
722
723########################################
724# virtio
725########################################
726
Ed Warnickecb9cada2015-12-08 15:45:58 -0700727libvnet_la_SOURCES += \
728 vnet/devices/virtio/vhost-user.c
729
730nobase_include_HEADERS += \
731 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700732
733########################################
734# ssvm ethernet
735########################################
736libvnet_la_SOURCES += \
737 vnet/devices/ssvm/ssvm_eth.c \
738 vnet/devices/ssvm/node.c
739
740nobase_include_HEADERS += \
741 vnet/devices/ssvm/ssvm_eth.h
742
743########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100744# Linux packet interface
745########################################
746
747libvnet_la_SOURCES += \
748 vnet/devices/af_packet/af_packet.c \
749 vnet/devices/af_packet/device.c \
750 vnet/devices/af_packet/node.c \
751 vnet/devices/af_packet/cli.c
752
753nobase_include_HEADERS += \
754 vnet/devices/af_packet/af_packet.h
755
756########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200757# NETMAP interface
758########################################
759
760libvnet_la_SOURCES += \
761 vnet/devices/netmap/netmap.c \
762 vnet/devices/netmap/device.c \
763 vnet/devices/netmap/node.c \
764 vnet/devices/netmap/cli.c
765
766nobase_include_HEADERS += \
767 vnet/devices/netmap/netmap.h
768
769
770########################################
Damjan Marion22311502016-10-28 20:30:15 +0200771# Driver feature graph arc support
772########################################
773
774libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200775 vnet/feature/feature.c \
776 vnet/feature/registration.c
777
778nobase_include_HEADERS += \
779 vnet/feature/feature.h
780
781########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700782# Unix kernel related
783########################################
784
785# FIXME: vnet/unix/hgshm.c
786
787libvnet_la_SOURCES += \
788 vnet/unix/gdb_funcs.c \
789 vnet/unix/pcap.c \
790 vnet/unix/tapcli.c \
791 vnet/unix/tuntap.c
792
793nobase_include_HEADERS += \
794 vnet/unix/pcap.h \
795 vnet/unix/tuntap.h \
796 vnet/unix/tapcli.h
797
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400798########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100799# FIB
800########################################
801
802libvnet_la_SOURCES += \
803 vnet/fib/fib.c \
804 vnet/fib/fib_test.c \
805 vnet/fib/ip4_fib.c \
806 vnet/fib/ip6_fib.c \
807 vnet/fib/mpls_fib.c \
808 vnet/fib/fib_table.c \
809 vnet/fib/fib_walk.c \
810 vnet/fib/fib_types.c \
811 vnet/fib/fib_node.c \
812 vnet/fib/fib_node_list.c \
813 vnet/fib/fib_entry.c \
814 vnet/fib/fib_entry_src.c \
815 vnet/fib/fib_entry_src_rr.c \
816 vnet/fib/fib_entry_src_interface.c \
817 vnet/fib/fib_entry_src_default_route.c \
818 vnet/fib/fib_entry_src_special.c \
819 vnet/fib/fib_entry_src_api.c \
820 vnet/fib/fib_entry_src_adj.c \
821 vnet/fib/fib_entry_src_mpls.c \
822 vnet/fib/fib_entry_src_lisp.c \
823 vnet/fib/fib_entry_cover.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000824 vnet/fib/fib_entry_delegate.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100825 vnet/fib/fib_path_list.c \
826 vnet/fib/fib_path.c \
827 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100828 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100829 vnet/fib/fib_attached_export.c
830
831nobase_include_HEADERS += \
832 vnet/fib/fib.h \
Dave Barachb5e8a772016-12-06 12:04:42 -0500833 vnet/fib/fib_api.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100834 vnet/fib/ip4_fib.h \
835 vnet/fib/ip6_fib.h \
836 vnet/fib/fib_types.h \
837 vnet/fib/fib_table.h \
838 vnet/fib/fib_node.h \
839 vnet/fib/fib_node_list.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000840 vnet/fib/fib_entry.h \
841 vnet/fib/fib_entry_delegate.h
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100842
843########################################
844# ADJ
845########################################
846
847libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100848 vnet/adj/adj_nbr.c \
849 vnet/adj/adj_rewrite.c \
850 vnet/adj/adj_glean.c \
851 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100852 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100853 vnet/adj/adj.c
854
855nobase_include_HEADERS += \
856 vnet/adj/adj.h \
857 vnet/adj/adj_types.h \
858 vnet/adj/adj_rewrite.h \
859 vnet/adj/adj_glean.h \
860 vnet/adj/adj_nbr.h
861
862########################################
863# Data-Plane Objects
864########################################
865
866libvnet_la_SOURCES += \
867 vnet/dpo/dpo.c \
868 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100869 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100870 vnet/dpo/punt_dpo.c \
871 vnet/dpo/receive_dpo.c \
872 vnet/dpo/load_balance.c \
873 vnet/dpo/load_balance_map.c \
874 vnet/dpo/lookup_dpo.c \
875 vnet/dpo/classify_dpo.c \
876 vnet/dpo/mpls_label_dpo.c
877
878nobase_include_HEADERS += \
879 vnet/dpo/load_balance.h \
880 vnet/dpo/drop_dpo.h \
881 vnet/dpo/lookup_dpo.h \
882 vnet/dpo/punt_dpo.h \
883 vnet/dpo/classify_dpo.h \
884 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100885 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100886 vnet/dpo/dpo.h
887
888########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400889# Plugin client library
890########################################
891
892libvnetplugin_la_SOURCES += \
893 vnet/plugin/p1.c
894
895nobase_include_HEADERS += \
896 vnet/plugin/plugin.h
897
898lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700899
Ed Warnickecb9cada2015-12-08 15:45:58 -0700900pcap2pg_SOURCES = \
901 vnet/unix/pcap2pg.c \
902 vnet/unix/pcap.h
903
904pcap2pg_LDFLAGS = -static
905pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
906
907noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400908
909# Set the suffix list
Ole Troanf14e3bf2016-12-01 21:49:03 +0100910SUFFIXES = .api.h .api .api.json
Dave Barachaff70772016-10-31 11:59:07 -0400911
912# install the API definition, so we can produce java bindings, etc.
913
Ole Troanf14e3bf2016-12-01 21:49:03 +0100914apidir = $(prefix)/vnet
Dave Barachb5e8a772016-12-06 12:04:42 -0500915
Ole Troanf0c90e22016-12-06 12:50:08 +0100916api_DATA = \
917 vnet/interface.api.json \
Dave Barachb5e8a772016-12-06 12:04:42 -0500918 vnet/ip/ip.api.json \
Ole Troanf0c90e22016-12-06 12:50:08 +0100919 vnet/l2/l2.api.json \
Ole Troan399ca1c2016-12-06 23:00:38 +0100920 vnet/map/map.api.json \
921 vnet/span/span.api.json
Dave Barachaff70772016-10-31 11:59:07 -0400922
923# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
924# and requires a symbolic link at the top of the vnet source tree
925
926include $(top_srcdir)/suffix-rules.mk