blob: a9481d11dc24f9aaa8141c8275e074e22378abc4 [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 Barachaff70772016-10-31 11:59:07 -040018BUILT_SOURCES = vnet/interface.api.h
19
Ed Warnickecb9cada2015-12-08 15:45:58 -070020libvnet_la_SOURCES =
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -040021libvnetplugin_la_SOURCES =
Ed Warnickecb9cada2015-12-08 15:45:58 -070022nobase_include_HEADERS =
Dave Barach4e281a42015-12-14 11:13:29 -050023noinst_PROGRAMS =
Filip Tehlar254b0362016-04-07 10:04:34 +020024TESTS =
Ed Warnickecb9cada2015-12-08 15:45:58 -070025
Ole Troand575e692016-08-25 12:26:47 +020026dpdk_libs =
27if WITH_DPDK
28dpdk_libs += -l:libdpdk.a
29endif
30
Ed Warnickecb9cada2015-12-08 15:45:58 -070031########################################
32# Generic stuff
33########################################
34libvnet_la_SOURCES += \
35 vnet/config.c \
Damjan Marion51327ac2016-11-09 11:59:42 +010036 vnet/devices/devices.c \
Damjan Marion0247b462016-06-08 01:37:11 +020037 vnet/handoff.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070038 vnet/interface.c \
Dave Barachaff70772016-10-31 11:59:07 -040039 vnet/interface_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070040 vnet/interface_cli.c \
41 vnet/interface_format.c \
42 vnet/interface_output.c \
43 vnet/misc.c \
44 vnet/replication.c \
45 vnet/rewrite.c
46
47nobase_include_HEADERS += \
48 vnet/api_errno.h \
49 vnet/buffer.h \
50 vnet/config.h \
Damjan Marion8bdc63b2016-11-02 14:48:21 +010051 vnet/devices/devices.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070052 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020053 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070054 vnet/interface.h \
Dave Barachaff70772016-10-31 11:59:07 -040055 vnet/interface.api.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070056 vnet/interface_funcs.h \
57 vnet/l3_types.h \
58 vnet/pipeline.h \
59 vnet/replication.h \
60 vnet/rewrite.h \
Dave Barachaff70772016-10-31 11:59:07 -040061 vnet/vnet.h \
62 vnet/vnet_all_api_h.h \
63 vnet/vnet_msg_enum.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070064
65########################################
66# Policer infra
67########################################
68
69libvnet_la_SOURCES += \
70 vnet/policer/node_funcs.c \
71 vnet/policer/policer.c \
72 vnet/policer/xlate.c
73
74nobase_include_HEADERS += \
75 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070076 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070077 vnet/policer/xlate.h
78
Dave Barachc07bf5d2016-02-17 17:52:26 -050079########################################
80# Cop - junk filter
81########################################
82
83libvnet_la_SOURCES += \
84 vnet/cop/cop.c \
85 vnet/cop/node1.c \
86 vnet/cop/ip4_whitelist.c \
87 vnet/cop/ip6_whitelist.c
88
89nobase_include_HEADERS += \
90 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070091
92########################################
93# Layer 2 protocols go here
94########################################
95
96########################################
97# Layer 2 protocol: Ethernet
98########################################
99libvnet_la_SOURCES += \
100 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700101 vnet/ethernet/format.c \
102 vnet/ethernet/init.c \
103 vnet/ethernet/interface.c \
104 vnet/ethernet/node.c \
105 vnet/ethernet/pg.c
106
107nobase_include_HEADERS += \
108 vnet/ethernet/arp_packet.h \
109 vnet/ethernet/error.def \
110 vnet/ethernet/ethernet.h \
111 vnet/ethernet/packet.h \
112 vnet/ethernet/types.def
113
114########################################
115# Layer 2 protocol: Ethernet bridging
116########################################
117libvnet_la_SOURCES += \
118 vnet/l2/feat_bitmap.c \
119 vnet/l2/l2_bd.c \
120 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400121 vnet/l2/l2_input_classify.c \
122 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700123 vnet/l2/l2_efp_filter.c \
124 vnet/l2/l2_fib.c \
125 vnet/l2/l2_flood.c \
126 vnet/l2/l2_fwd.c \
127 vnet/l2/l2_input_acl.c \
128 vnet/l2/l2_input.c \
129 vnet/l2/l2_input_vtr.c \
130 vnet/l2/l2_learn.c \
131 vnet/l2/l2_output_acl.c \
132 vnet/l2/l2_output.c \
133 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000134 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700135 vnet/l2/l2_vtr.c \
136 vnet/l2/l2_xcrw.c
137
138nobase_include_HEADERS += \
139 vnet/l2/feat_bitmap.h \
140 vnet/l2/l2_input.h \
141 vnet/l2/l2_output.h \
142 vnet/l2/l2_vtr.h \
143 vnet/l2/l2_input_vtr.h \
144 vnet/l2/l2_efp_filter.h \
145 vnet/l2/l2_fwd.h \
146 vnet/l2/l2_bd.h \
147 vnet/l2/l2_bvi.h \
148 vnet/l2/l2_flood.h \
149 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000150 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700151 vnet/l2/l2_xcrw.h \
152 vnet/l2/l2_classify.h
153
154########################################
155# Layer 2 protocol: SRP
156########################################
157libvnet_la_SOURCES += \
158 vnet/srp/format.c \
159 vnet/srp/interface.c \
160 vnet/srp/node.c \
161 vnet/srp/pg.c
162
163nobase_include_HEADERS += \
164 vnet/srp/packet.h \
165 vnet/srp/srp.h
166
167########################################
168# Layer 2 protocol: PPP
169########################################
170libvnet_la_SOURCES += \
171 vnet/ppp/node.c \
172 vnet/ppp/pg.c \
173 vnet/ppp/ppp.c
174
175nobase_include_HEADERS += \
176 vnet/ppp/error.def \
177 vnet/ppp/ppp.h \
178 vnet/ppp/packet.h
179
180########################################
181# Layer 2 protocol: HDLC
182########################################
183libvnet_la_SOURCES += \
184 vnet/hdlc/node.c \
185 vnet/hdlc/pg.c \
186 vnet/hdlc/hdlc.c
187
188nobase_include_HEADERS += \
189 vnet/hdlc/error.def \
190 vnet/hdlc/hdlc.h \
191 vnet/hdlc/packet.h
192
193########################################
194# Layer 2 protocol: LLC
195########################################
196libvnet_la_SOURCES += \
197 vnet/llc/llc.c \
198 vnet/llc/node.c \
199 vnet/llc/pg.c
200
201nobase_include_HEADERS += \
202 vnet/llc/llc.h
203
204########################################
205# Layer 2 protocol: SNAP
206########################################
207libvnet_la_SOURCES += \
208 vnet/snap/snap.c \
209 vnet/snap/node.c \
210 vnet/snap/pg.c
211
212nobase_include_HEADERS += \
213 vnet/snap/snap.h
214
215########################################
216# Layer 2 / vxlan
217########################################
218libvnet_la_SOURCES += \
219 vnet/vxlan/vxlan.c \
220 vnet/vxlan/encap.c \
221 vnet/vxlan/decap.c
222
223nobase_include_HEADERS += \
224 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500225 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700226 vnet/vxlan/vxlan_error.def
227
228########################################
Dave Barachced48e72016-02-08 15:57:35 -0500229# Layer 2 / CDP
230########################################
231libvnet_la_SOURCES += \
232 vnet/cdp/cdp_input.c \
233 vnet/cdp/cdp_node.c \
234 vnet/cdp/cdp_periodic.c
235
236nobase_include_HEADERS += \
237 vnet/cdp/cdp_protocol.h
238
239########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200240# Layer 2 / LLDP
241########################################
242libvnet_la_SOURCES += \
243 vnet/lldp/lldp_input.c \
244 vnet/lldp/lldp_node.c \
245 vnet/lldp/lldp_output.c \
246 vnet/lldp/lldp_cli.c
247
248nobase_include_HEADERS += \
249 vnet/lldp/lldp_protocol.h
250
251########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700252# Layer 2/3 "classify"
253########################################
254libvnet_la_SOURCES += \
255 vnet/classify/vnet_classify.c \
256 vnet/classify/ip_classify.c \
257 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700258 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700259 vnet/classify/flow_classify.c \
260 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700261 vnet/classify/vnet_classify.h
262
263nobase_include_HEADERS += \
264 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700265 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700266 vnet/classify/policer_classify.h \
267 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700268
269########################################
270# Layer 3 protocols go here
271########################################
272
Ed Warnickecb9cada2015-12-08 15:45:58 -0700273########################################
274# Layer 3 protocol: IP v4/v6
275########################################
276libvnet_la_SOURCES += \
277 vnet/ip/format.c \
278 vnet/ip/icmp4.c \
279 vnet/ip/icmp6.c \
280 vnet/ip/ip46_cli.c \
281 vnet/ip/ip4_format.c \
282 vnet/ip/ip4_forward.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700283 vnet/ip/ip4_input.c \
284 vnet/ip/ip4_mtrie.c \
285 vnet/ip/ip4_pg.c \
Dave Barach6f9bca22016-04-30 10:25:32 -0400286 vnet/ip/ip4_source_and_port_range_check.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200287 vnet/ip/ip4_source_check.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700288 vnet/ip/ip6_format.c \
289 vnet/ip/ip6_forward.c \
290 vnet/ip/ip6_hop_by_hop.c \
291 vnet/ip/ip6_input.c \
292 vnet/ip/ip6_neighbor.c \
293 vnet/ip/ip6_pg.c \
294 vnet/ip/ip_checksum.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200295 vnet/ip/ip_frag.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700296 vnet/ip/ip.h \
297 vnet/ip/ip_init.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200298 vnet/ip/ip_input_acl.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700299 vnet/ip/lookup.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200300 vnet/ip/ping.c \
301 vnet/ip/punt.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700302 vnet/ip/udp_format.c \
303 vnet/ip/udp_init.c \
304 vnet/ip/udp_local.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200305 vnet/ip/udp_pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700306
307nobase_include_HEADERS += \
308 vnet/ip/format.h \
309 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100310 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700311 vnet/ip/icmp6.h \
312 vnet/ip/igmp_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200313 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700314 vnet/ip/ip4.h \
315 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700316 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700317 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200318 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700319 vnet/ip/ip6_hop_by_hop.h \
320 vnet/ip/ip6_hop_by_hop_packet.h \
321 vnet/ip/ip6_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200322 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700323 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200324 vnet/ip/ip_source_and_port_range_check.h \
325 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700326 vnet/ip/ports.def \
327 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700328 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200329 vnet/ip/punt.h \
330 vnet/ip/tcp_packet.h \
331 vnet/ip/udp_error.def \
332 vnet/ip/udp.h \
333 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700334
335########################################
336# Layer 3 protocol: IPSec
337########################################
Dave Barach61efa142016-01-22 08:23:09 -0500338if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700339libvnet_la_SOURCES += \
340 vnet/ipsec/ipsec.c \
341 vnet/ipsec/ipsec_cli.c \
342 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700343 vnet/ipsec/ipsec_input.c \
344 vnet/ipsec/ipsec_if.c \
345 vnet/ipsec/ipsec_if_in.c \
346 vnet/ipsec/ipsec_if_out.c \
347 vnet/ipsec/esp_encrypt.c \
348 vnet/ipsec/esp_decrypt.c \
349 vnet/ipsec/ikev2.c \
350 vnet/ipsec/ikev2_crypto.c \
351 vnet/ipsec/ikev2_cli.c \
352 vnet/ipsec/ikev2_payload.c \
353 vnet/ipsec/ikev2_format.c
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000354if WITH_DPDK_CRYPTO
355libvnet_la_SOURCES += \
356 vnet/devices/dpdk/ipsec/esp_encrypt.c \
357 vnet/devices/dpdk/ipsec/esp_decrypt.c \
358 vnet/devices/dpdk/ipsec/crypto_node.c \
359 vnet/devices/dpdk/ipsec/cli.c \
360 vnet/devices/dpdk/ipsec/ipsec.c
361endif
362endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700363
Damjan Marione936bbe2016-02-25 23:17:38 +0100364libvnet_la_SOURCES += \
365 vnet/ipsec/ipsec_output.c
366
Ed Warnickecb9cada2015-12-08 15:45:58 -0700367nobase_include_HEADERS += \
368 vnet/ipsec/ipsec.h \
369 vnet/ipsec/esp.h \
370 vnet/ipsec/ikev2.h \
371 vnet/ipsec/ikev2_priv.h
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000372if WITH_DPDK_CRYPTO
373nobase_include_HEADERS += \
374 vnet/devices/dpdk/ipsec/ipsec.h \
375 vnet/devices/dpdk/ipsec/esp.h
376endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700377
378########################################
379# Layer 3 protocol: osi
380########################################
381libvnet_la_SOURCES += \
382 vnet/osi/node.c \
383 vnet/osi/osi.c \
384 vnet/osi/pg.c
385
386nobase_include_HEADERS += \
387 vnet/osi/osi.h
388
389########################################
390# Layer 3 protocol: MAP
391########################################
392libvnet_la_SOURCES += \
393 vnet/map/map.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100394 vnet/map/map_dpo.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700395 vnet/map/ip4_map.c \
396 vnet/map/ip6_map.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700397 vnet/map/ip4_map_t.c \
398 vnet/map/ip6_map_t.c
399
400nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100401 vnet/map/map.h \
402 vnet/map/map_dpo.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700403
Ole Troand575e692016-08-25 12:26:47 +0200404if ENABLE_TESTS
405TESTS += test_map
406test_map_SOURCES = \
407 vnet/map/test.c
408test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
409
410test_map_LDADD = libvnet.la -lvppinfra -lvlib \
411 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
412 -ldl -lsvm -lrt
413
414test_map_LDFLAGS = -static
415endif
416
417
Ed Warnickecb9cada2015-12-08 15:45:58 -0700418########################################
419# Tunnel protocol: gre
420########################################
421libvnet_la_SOURCES += \
422 vnet/gre/gre.c \
423 vnet/gre/node.c \
424 vnet/gre/interface.c \
425 vnet/gre/pg.c
426
427nobase_include_HEADERS += \
428 vnet/gre/gre.h \
429 vnet/gre/packet.h \
430 vnet/gre/error.def
431
432########################################
433# Tunnel protocol: l2tpv3
434########################################
435libvnet_la_SOURCES += \
436 vnet/l2tp/l2tp.c \
437 vnet/l2tp/encap.c \
438 vnet/l2tp/decap.c \
439 vnet/l2tp/pg.c
440
441nobase_include_HEADERS += \
442 vnet/l2tp/l2tp.h \
443 vnet/l2tp/packet.h
444
445########################################
446# Tunnel protocol: gre+mpls
447########################################
448libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100449 vnet/mpls/mpls.c \
450 vnet/mpls/mpls_lookup.c \
451 vnet/mpls/mpls_output.c \
452 vnet/mpls/mpls_features.c \
453 vnet/mpls/node.c \
454 vnet/mpls/interface.c \
455 vnet/mpls/policy_encap.c \
456 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700457
458nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100459 vnet/mpls/mpls.h \
460 vnet/mpls/mpls_types.h \
461 vnet/mpls/packet.h \
462 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700463
464
465########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700466# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700467########################################
468
469libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700470 vnet/vxlan-gpe/vxlan_gpe.c \
471 vnet/vxlan-gpe/encap.c \
472 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700473
474nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700475 vnet/vxlan-gpe/vxlan_gpe.h \
476 vnet/vxlan-gpe/vxlan_gpe_packet.h \
477 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700478
479########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700480# Tunnel protocol: ipsec+gre
481########################################
482libvnet_la_SOURCES += \
483 vnet/ipsec-gre/ipsec_gre.c \
484 vnet/ipsec-gre/node.c \
485 vnet/ipsec-gre/interface.c
486
487nobase_include_HEADERS += \
488 vnet/ipsec-gre/ipsec_gre.h \
489 vnet/ipsec-gre/error.def
490
491########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100492# LISP control plane: lisp-cp
493########################################
494
495libvnet_la_SOURCES += \
496 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100497 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100498 vnet/lisp-cp/control.c \
499 vnet/lisp-cp/gid_dictionary.c \
500 vnet/lisp-cp/lisp_msg_serdes.c \
501 vnet/lisp-cp/packets.c
502
503nobase_include_HEADERS += \
504 vnet/lisp-cp/lisp_types.h \
505 vnet/lisp-cp/packets.h \
506 vnet/lisp-cp/gid_dictionary.h \
507 vnet/lisp-cp/lisp_cp_messages.h \
508 vnet/lisp-cp/lisp_msg_serdes.h \
509 vnet/lisp-cp/control.h
510
Filip Tehlar254b0362016-04-07 10:04:34 +0200511
512if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200513LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200514 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
515
516TESTS += test_cp_serdes test_lisp_types
517
518test_cp_serdes_SOURCES = \
519 test/lisp-cp/test_cp_serdes.c \
520 vnet/lisp-cp/lisp_msg_serdes.c \
521 vnet/lisp-cp/lisp_types.c \
522 vnet/lisp-cp/packets.c \
523 vnet/ip/ip_checksum.c
524
525test_lisp_types_SOURCES = \
526 test/lisp-cp/test_lisp_types.c \
527 vnet/lisp-cp/lisp_types.c
528
529test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
530test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
531
532test_cp_serdes_LDADD = libvnet.la $(LDS)
533test_lisp_types_LDADD = libvnet.la $(LDS)
534
535test_cp_serdes_LDFLAGS = -static
536test_lisp_types_LDFLAGS = -static
537endif
538
Florin Corase127a7e2016-02-18 22:20:01 +0100539########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700540# Tunnel protocol: lisp-gpe
541########################################
542
543libvnet_la_SOURCES += \
544 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100545 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
546 vnet/lisp-gpe/lisp_gpe_adjacency.c \
547 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100548 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
549 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200550 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100551 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700552
553nobase_include_HEADERS += \
554 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100555 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
556 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700557 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100558 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700559
Filip Tehlar254b0362016-04-07 10:04:34 +0200560if ENABLE_TESTS
561TESTS += test_test
562
563test_test_SOURCES = test/lisp-gpe/test.c
564
565test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
566
567test_test_LDADD = $(LIBOBJS)
568
569noinst_PROGRAMS += $(TESTS)
570check_PROGRAMS = $(TESTS)
571endif
572
Ed Warnickecb9cada2015-12-08 15:45:58 -0700573########################################
574# DHCP client
575########################################
576libvnet_la_SOURCES += \
577 vnet/dhcp/client.c \
578 vnet/dhcp/client.h
579
580nobase_include_HEADERS += \
581 vnet/dhcp/client.h
582
583########################################
584# DHCP proxy
585########################################
586libvnet_la_SOURCES += \
587 vnet/dhcp/proxy_node.c \
588 vnet/dhcp/proxy.h
589
590nobase_include_HEADERS += \
591 vnet/dhcp/packet.h \
592 vnet/dhcp/proxy.h \
593 vnet/dhcp/proxy_error.def
594
595########################################
596# ipv6 segment routing
597########################################
Dave Barach61efa142016-01-22 08:23:09 -0500598
599if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700600libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700601 vnet/sr/sr.c \
602 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500603endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700604
605nobase_include_HEADERS += \
606 vnet/sr/sr_packet.h \
607 vnet/sr/sr_error.def \
608 vnet/sr/sr.h
609
610########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700611# DHCPv6 proxy
612########################################
613libvnet_la_SOURCES += \
614 vnet/dhcpv6/proxy_node.c
615
616nobase_include_HEADERS += \
617 vnet/dhcpv6/packet.h \
618 vnet/dhcpv6/proxy.h \
619 vnet/dhcpv6/proxy_error.def
620
621########################################
622# IPFIX / netflow v10
623########################################
624libvnet_la_SOURCES += \
625 vnet/flow/flow_report.c
626
627nobase_include_HEADERS += \
628 vnet/flow/flow_report.h \
629 vnet/flow/ipfix_info_elements.h \
630 vnet/flow/ipfix_packet.h
631
632########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700633# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700634########################################
635
636libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700637 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700638
639nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700640 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700641
642########################################
643# lawful intercept
644########################################
645
646libvnet_la_SOURCES += \
647 vnet/lawful-intercept/lawful_intercept.c \
648 vnet/lawful-intercept/node.c
649
650nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700651 vnet/lawful-intercept/lawful_intercept.h
652
653########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100654# SPAN (port mirroring)
655########################################
656
657libvnet_la_SOURCES += \
658 vnet/span/span.c \
659 vnet/span/node.c
660
661nobase_include_HEADERS += \
662 vnet/span/span.h
663
664########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700665# Packet generator
666########################################
667
668libvnet_la_SOURCES += \
669 vnet/pg/cli.c \
670 vnet/pg/edit.c \
671 vnet/pg/init.c \
672 vnet/pg/input.c \
673 vnet/pg/output.c \
674 vnet/pg/stream.c
675
676nobase_include_HEADERS += \
677 vnet/pg/pg.h \
678 vnet/pg/edit.h
679
680########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000681# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700682########################################
683if WITH_DPDK
684libvnet_la_SOURCES += \
685 vnet/devices/dpdk/dpdk_priv.h \
686 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100687 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700688 vnet/devices/dpdk/init.c \
689 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100690 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700691 vnet/devices/dpdk/cli.c
692
693nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200694 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200695else
696libvnet_la_SOURCES += \
697 vnet/devices/nic/ixge.c \
698 vnet/devices/nic/ixge.h \
699 vnet/devices/nic/sfp.c \
700 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700701endif
702
703########################################
704# virtio
705########################################
706
Ed Warnickecb9cada2015-12-08 15:45:58 -0700707libvnet_la_SOURCES += \
708 vnet/devices/virtio/vhost-user.c
709
710nobase_include_HEADERS += \
711 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700712
713########################################
714# ssvm ethernet
715########################################
716libvnet_la_SOURCES += \
717 vnet/devices/ssvm/ssvm_eth.c \
718 vnet/devices/ssvm/node.c
719
720nobase_include_HEADERS += \
721 vnet/devices/ssvm/ssvm_eth.h
722
723########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100724# Linux packet interface
725########################################
726
727libvnet_la_SOURCES += \
728 vnet/devices/af_packet/af_packet.c \
729 vnet/devices/af_packet/device.c \
730 vnet/devices/af_packet/node.c \
731 vnet/devices/af_packet/cli.c
732
733nobase_include_HEADERS += \
734 vnet/devices/af_packet/af_packet.h
735
736########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200737# NETMAP interface
738########################################
739
740libvnet_la_SOURCES += \
741 vnet/devices/netmap/netmap.c \
742 vnet/devices/netmap/device.c \
743 vnet/devices/netmap/node.c \
744 vnet/devices/netmap/cli.c
745
746nobase_include_HEADERS += \
747 vnet/devices/netmap/netmap.h
748
749
750########################################
Damjan Marion22311502016-10-28 20:30:15 +0200751# Driver feature graph arc support
752########################################
753
754libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200755 vnet/feature/feature.c \
756 vnet/feature/registration.c
757
758nobase_include_HEADERS += \
759 vnet/feature/feature.h
760
761########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700762# Unix kernel related
763########################################
764
765# FIXME: vnet/unix/hgshm.c
766
767libvnet_la_SOURCES += \
768 vnet/unix/gdb_funcs.c \
769 vnet/unix/pcap.c \
770 vnet/unix/tapcli.c \
771 vnet/unix/tuntap.c
772
773nobase_include_HEADERS += \
774 vnet/unix/pcap.h \
775 vnet/unix/tuntap.h \
776 vnet/unix/tapcli.h
777
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400778########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100779# FIB
780########################################
781
782libvnet_la_SOURCES += \
783 vnet/fib/fib.c \
784 vnet/fib/fib_test.c \
785 vnet/fib/ip4_fib.c \
786 vnet/fib/ip6_fib.c \
787 vnet/fib/mpls_fib.c \
788 vnet/fib/fib_table.c \
789 vnet/fib/fib_walk.c \
790 vnet/fib/fib_types.c \
791 vnet/fib/fib_node.c \
792 vnet/fib/fib_node_list.c \
793 vnet/fib/fib_entry.c \
794 vnet/fib/fib_entry_src.c \
795 vnet/fib/fib_entry_src_rr.c \
796 vnet/fib/fib_entry_src_interface.c \
797 vnet/fib/fib_entry_src_default_route.c \
798 vnet/fib/fib_entry_src_special.c \
799 vnet/fib/fib_entry_src_api.c \
800 vnet/fib/fib_entry_src_adj.c \
801 vnet/fib/fib_entry_src_mpls.c \
802 vnet/fib/fib_entry_src_lisp.c \
803 vnet/fib/fib_entry_cover.c \
804 vnet/fib/fib_path_list.c \
805 vnet/fib/fib_path.c \
806 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100807 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100808 vnet/fib/fib_attached_export.c
809
810nobase_include_HEADERS += \
811 vnet/fib/fib.h \
812 vnet/fib/ip4_fib.h \
813 vnet/fib/ip6_fib.h \
814 vnet/fib/fib_types.h \
815 vnet/fib/fib_table.h \
816 vnet/fib/fib_node.h \
817 vnet/fib/fib_node_list.h \
818 vnet/fib/fib_entry.h
819
820########################################
821# ADJ
822########################################
823
824libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100825 vnet/adj/adj_nbr.c \
826 vnet/adj/adj_rewrite.c \
827 vnet/adj/adj_glean.c \
828 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100829 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100830 vnet/adj/adj.c
831
832nobase_include_HEADERS += \
833 vnet/adj/adj.h \
834 vnet/adj/adj_types.h \
835 vnet/adj/adj_rewrite.h \
836 vnet/adj/adj_glean.h \
837 vnet/adj/adj_nbr.h
838
839########################################
840# Data-Plane Objects
841########################################
842
843libvnet_la_SOURCES += \
844 vnet/dpo/dpo.c \
845 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100846 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100847 vnet/dpo/punt_dpo.c \
848 vnet/dpo/receive_dpo.c \
849 vnet/dpo/load_balance.c \
850 vnet/dpo/load_balance_map.c \
851 vnet/dpo/lookup_dpo.c \
852 vnet/dpo/classify_dpo.c \
853 vnet/dpo/mpls_label_dpo.c
854
855nobase_include_HEADERS += \
856 vnet/dpo/load_balance.h \
857 vnet/dpo/drop_dpo.h \
858 vnet/dpo/lookup_dpo.h \
859 vnet/dpo/punt_dpo.h \
860 vnet/dpo/classify_dpo.h \
861 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100862 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100863 vnet/dpo/dpo.h
864
865########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400866# Plugin client library
867########################################
868
869libvnetplugin_la_SOURCES += \
870 vnet/plugin/p1.c
871
872nobase_include_HEADERS += \
873 vnet/plugin/plugin.h
874
875lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700876
Ed Warnickecb9cada2015-12-08 15:45:58 -0700877pcap2pg_SOURCES = \
878 vnet/unix/pcap2pg.c \
879 vnet/unix/pcap.h
880
881pcap2pg_LDFLAGS = -static
882pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
883
884noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400885
886# Set the suffix list
887SUFFIXES = .api.h .api
888
889# install the API definition, so we can produce java bindings, etc.
890
891apidir = $(prefix)/vpp-api
892api_DATA = vnet/interface.api
893
894# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
895# and requires a symbolic link at the top of the vnet source tree
896
897include $(top_srcdir)/suffix-rules.mk