blob: 7d6abc608402144cd2b956287fade167eccd54fd [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
Ole Troanf14e3bf2016-12-01 21:49:03 +010018BUILT_SOURCES = vnet/interface.api.h vnet/interface.api.json
Dave Barachaff70772016-10-31 11:59:07 -040019
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 \
Neale Rannsad422ed2016-11-02 14:20:04 +0000455 vnet/mpls/mpls_tunnel.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100456 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 \
Neale Rannsad422ed2016-11-02 14:20:04 +0000461 vnet/mpls/mpls_tunnel.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100462 vnet/mpls/packet.h \
463 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700464
465
466########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700467# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700468########################################
469
470libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700471 vnet/vxlan-gpe/vxlan_gpe.c \
472 vnet/vxlan-gpe/encap.c \
473 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700474
475nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700476 vnet/vxlan-gpe/vxlan_gpe.h \
477 vnet/vxlan-gpe/vxlan_gpe_packet.h \
478 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700479
480########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700481# Tunnel protocol: ipsec+gre
482########################################
483libvnet_la_SOURCES += \
484 vnet/ipsec-gre/ipsec_gre.c \
485 vnet/ipsec-gre/node.c \
486 vnet/ipsec-gre/interface.c
487
488nobase_include_HEADERS += \
489 vnet/ipsec-gre/ipsec_gre.h \
490 vnet/ipsec-gre/error.def
491
492########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100493# LISP control plane: lisp-cp
494########################################
495
496libvnet_la_SOURCES += \
497 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100498 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100499 vnet/lisp-cp/control.c \
500 vnet/lisp-cp/gid_dictionary.c \
501 vnet/lisp-cp/lisp_msg_serdes.c \
502 vnet/lisp-cp/packets.c
503
504nobase_include_HEADERS += \
505 vnet/lisp-cp/lisp_types.h \
506 vnet/lisp-cp/packets.h \
507 vnet/lisp-cp/gid_dictionary.h \
508 vnet/lisp-cp/lisp_cp_messages.h \
509 vnet/lisp-cp/lisp_msg_serdes.h \
510 vnet/lisp-cp/control.h
511
Filip Tehlar254b0362016-04-07 10:04:34 +0200512
513if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200514LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200515 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
516
517TESTS += test_cp_serdes test_lisp_types
518
519test_cp_serdes_SOURCES = \
520 test/lisp-cp/test_cp_serdes.c \
521 vnet/lisp-cp/lisp_msg_serdes.c \
522 vnet/lisp-cp/lisp_types.c \
523 vnet/lisp-cp/packets.c \
524 vnet/ip/ip_checksum.c
525
526test_lisp_types_SOURCES = \
527 test/lisp-cp/test_lisp_types.c \
528 vnet/lisp-cp/lisp_types.c
529
530test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
531test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
532
533test_cp_serdes_LDADD = libvnet.la $(LDS)
534test_lisp_types_LDADD = libvnet.la $(LDS)
535
536test_cp_serdes_LDFLAGS = -static
537test_lisp_types_LDFLAGS = -static
538endif
539
Florin Corase127a7e2016-02-18 22:20:01 +0100540########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700541# Tunnel protocol: lisp-gpe
542########################################
543
544libvnet_la_SOURCES += \
545 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100546 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
547 vnet/lisp-gpe/lisp_gpe_adjacency.c \
548 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100549 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
550 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200551 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100552 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700553
554nobase_include_HEADERS += \
555 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100556 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
557 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700558 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100559 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700560
Filip Tehlar254b0362016-04-07 10:04:34 +0200561if ENABLE_TESTS
562TESTS += test_test
563
564test_test_SOURCES = test/lisp-gpe/test.c
565
566test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
567
568test_test_LDADD = $(LIBOBJS)
569
570noinst_PROGRAMS += $(TESTS)
571check_PROGRAMS = $(TESTS)
572endif
573
Ed Warnickecb9cada2015-12-08 15:45:58 -0700574########################################
575# DHCP client
576########################################
577libvnet_la_SOURCES += \
578 vnet/dhcp/client.c \
579 vnet/dhcp/client.h
580
581nobase_include_HEADERS += \
582 vnet/dhcp/client.h
583
584########################################
585# DHCP proxy
586########################################
587libvnet_la_SOURCES += \
588 vnet/dhcp/proxy_node.c \
589 vnet/dhcp/proxy.h
590
591nobase_include_HEADERS += \
592 vnet/dhcp/packet.h \
593 vnet/dhcp/proxy.h \
594 vnet/dhcp/proxy_error.def
595
596########################################
597# ipv6 segment routing
598########################################
Dave Barach61efa142016-01-22 08:23:09 -0500599
600if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700601libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700602 vnet/sr/sr.c \
603 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500604endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700605
606nobase_include_HEADERS += \
607 vnet/sr/sr_packet.h \
608 vnet/sr/sr_error.def \
609 vnet/sr/sr.h
610
611########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700612# DHCPv6 proxy
613########################################
614libvnet_la_SOURCES += \
615 vnet/dhcpv6/proxy_node.c
616
617nobase_include_HEADERS += \
618 vnet/dhcpv6/packet.h \
619 vnet/dhcpv6/proxy.h \
620 vnet/dhcpv6/proxy_error.def
621
622########################################
623# IPFIX / netflow v10
624########################################
625libvnet_la_SOURCES += \
626 vnet/flow/flow_report.c
627
628nobase_include_HEADERS += \
629 vnet/flow/flow_report.h \
630 vnet/flow/ipfix_info_elements.h \
631 vnet/flow/ipfix_packet.h
632
633########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700634# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700635########################################
636
637libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700638 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700639
640nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700641 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700642
643########################################
644# lawful intercept
645########################################
646
647libvnet_la_SOURCES += \
648 vnet/lawful-intercept/lawful_intercept.c \
649 vnet/lawful-intercept/node.c
650
651nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700652 vnet/lawful-intercept/lawful_intercept.h
653
654########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100655# SPAN (port mirroring)
656########################################
657
658libvnet_la_SOURCES += \
659 vnet/span/span.c \
660 vnet/span/node.c
661
662nobase_include_HEADERS += \
663 vnet/span/span.h
664
665########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700666# Packet generator
667########################################
668
669libvnet_la_SOURCES += \
670 vnet/pg/cli.c \
671 vnet/pg/edit.c \
672 vnet/pg/init.c \
673 vnet/pg/input.c \
674 vnet/pg/output.c \
675 vnet/pg/stream.c
676
677nobase_include_HEADERS += \
678 vnet/pg/pg.h \
679 vnet/pg/edit.h
680
681########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000682# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700683########################################
684if WITH_DPDK
685libvnet_la_SOURCES += \
686 vnet/devices/dpdk/dpdk_priv.h \
687 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100688 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700689 vnet/devices/dpdk/init.c \
690 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100691 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700692 vnet/devices/dpdk/cli.c
693
694nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200695 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200696else
697libvnet_la_SOURCES += \
698 vnet/devices/nic/ixge.c \
699 vnet/devices/nic/ixge.h \
700 vnet/devices/nic/sfp.c \
701 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700702endif
703
704########################################
705# virtio
706########################################
707
Ed Warnickecb9cada2015-12-08 15:45:58 -0700708libvnet_la_SOURCES += \
709 vnet/devices/virtio/vhost-user.c
710
711nobase_include_HEADERS += \
712 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700713
714########################################
715# ssvm ethernet
716########################################
717libvnet_la_SOURCES += \
718 vnet/devices/ssvm/ssvm_eth.c \
719 vnet/devices/ssvm/node.c
720
721nobase_include_HEADERS += \
722 vnet/devices/ssvm/ssvm_eth.h
723
724########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100725# Linux packet interface
726########################################
727
728libvnet_la_SOURCES += \
729 vnet/devices/af_packet/af_packet.c \
730 vnet/devices/af_packet/device.c \
731 vnet/devices/af_packet/node.c \
732 vnet/devices/af_packet/cli.c
733
734nobase_include_HEADERS += \
735 vnet/devices/af_packet/af_packet.h
736
737########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200738# NETMAP interface
739########################################
740
741libvnet_la_SOURCES += \
742 vnet/devices/netmap/netmap.c \
743 vnet/devices/netmap/device.c \
744 vnet/devices/netmap/node.c \
745 vnet/devices/netmap/cli.c
746
747nobase_include_HEADERS += \
748 vnet/devices/netmap/netmap.h
749
750
751########################################
Damjan Marion22311502016-10-28 20:30:15 +0200752# Driver feature graph arc support
753########################################
754
755libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200756 vnet/feature/feature.c \
757 vnet/feature/registration.c
758
759nobase_include_HEADERS += \
760 vnet/feature/feature.h
761
762########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700763# Unix kernel related
764########################################
765
766# FIXME: vnet/unix/hgshm.c
767
768libvnet_la_SOURCES += \
769 vnet/unix/gdb_funcs.c \
770 vnet/unix/pcap.c \
771 vnet/unix/tapcli.c \
772 vnet/unix/tuntap.c
773
774nobase_include_HEADERS += \
775 vnet/unix/pcap.h \
776 vnet/unix/tuntap.h \
777 vnet/unix/tapcli.h
778
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400779########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100780# FIB
781########################################
782
783libvnet_la_SOURCES += \
784 vnet/fib/fib.c \
785 vnet/fib/fib_test.c \
786 vnet/fib/ip4_fib.c \
787 vnet/fib/ip6_fib.c \
788 vnet/fib/mpls_fib.c \
789 vnet/fib/fib_table.c \
790 vnet/fib/fib_walk.c \
791 vnet/fib/fib_types.c \
792 vnet/fib/fib_node.c \
793 vnet/fib/fib_node_list.c \
794 vnet/fib/fib_entry.c \
795 vnet/fib/fib_entry_src.c \
796 vnet/fib/fib_entry_src_rr.c \
797 vnet/fib/fib_entry_src_interface.c \
798 vnet/fib/fib_entry_src_default_route.c \
799 vnet/fib/fib_entry_src_special.c \
800 vnet/fib/fib_entry_src_api.c \
801 vnet/fib/fib_entry_src_adj.c \
802 vnet/fib/fib_entry_src_mpls.c \
803 vnet/fib/fib_entry_src_lisp.c \
804 vnet/fib/fib_entry_cover.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000805 vnet/fib/fib_entry_delegate.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100806 vnet/fib/fib_path_list.c \
807 vnet/fib/fib_path.c \
808 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100809 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100810 vnet/fib/fib_attached_export.c
811
812nobase_include_HEADERS += \
813 vnet/fib/fib.h \
814 vnet/fib/ip4_fib.h \
815 vnet/fib/ip6_fib.h \
816 vnet/fib/fib_types.h \
817 vnet/fib/fib_table.h \
818 vnet/fib/fib_node.h \
819 vnet/fib/fib_node_list.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000820 vnet/fib/fib_entry.h \
821 vnet/fib/fib_entry_delegate.h
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100822
823########################################
824# ADJ
825########################################
826
827libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100828 vnet/adj/adj_nbr.c \
829 vnet/adj/adj_rewrite.c \
830 vnet/adj/adj_glean.c \
831 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100832 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100833 vnet/adj/adj.c
834
835nobase_include_HEADERS += \
836 vnet/adj/adj.h \
837 vnet/adj/adj_types.h \
838 vnet/adj/adj_rewrite.h \
839 vnet/adj/adj_glean.h \
840 vnet/adj/adj_nbr.h
841
842########################################
843# Data-Plane Objects
844########################################
845
846libvnet_la_SOURCES += \
847 vnet/dpo/dpo.c \
848 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100849 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100850 vnet/dpo/punt_dpo.c \
851 vnet/dpo/receive_dpo.c \
852 vnet/dpo/load_balance.c \
853 vnet/dpo/load_balance_map.c \
854 vnet/dpo/lookup_dpo.c \
855 vnet/dpo/classify_dpo.c \
856 vnet/dpo/mpls_label_dpo.c
857
858nobase_include_HEADERS += \
859 vnet/dpo/load_balance.h \
860 vnet/dpo/drop_dpo.h \
861 vnet/dpo/lookup_dpo.h \
862 vnet/dpo/punt_dpo.h \
863 vnet/dpo/classify_dpo.h \
864 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100865 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100866 vnet/dpo/dpo.h
867
868########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400869# Plugin client library
870########################################
871
872libvnetplugin_la_SOURCES += \
873 vnet/plugin/p1.c
874
875nobase_include_HEADERS += \
876 vnet/plugin/plugin.h
877
878lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700879
Ed Warnickecb9cada2015-12-08 15:45:58 -0700880pcap2pg_SOURCES = \
881 vnet/unix/pcap2pg.c \
882 vnet/unix/pcap.h
883
884pcap2pg_LDFLAGS = -static
885pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
886
887noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400888
889# Set the suffix list
Ole Troanf14e3bf2016-12-01 21:49:03 +0100890SUFFIXES = .api.h .api .api.json
Dave Barachaff70772016-10-31 11:59:07 -0400891
892# install the API definition, so we can produce java bindings, etc.
893
Ole Troanf14e3bf2016-12-01 21:49:03 +0100894apidir = $(prefix)/vnet
895api_DATA = vnet/interface.api.json
Dave Barachaff70772016-10-31 11:59:07 -0400896
897# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
898# and requires a symbolic link at the top of the vnet source tree
899
900include $(top_srcdir)/suffix-rules.mk