blob: a8e48673d7f88e3e7796c2f08b05c87b984ce8c4 [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 Troanf0c90e22016-12-06 12:50:08 +010018BUILT_SOURCES = \
19 vnet/interface.api.h \
20 vnet/interface.api.json \
21 vnet/l2/l2.api.h \
22 vnet/l2/l2.api.json \
23 vnet/map/map.api.h \
24 vnet/map/map.api.json
Dave Barachaff70772016-10-31 11:59:07 -040025
Ed Warnickecb9cada2015-12-08 15:45:58 -070026libvnet_la_SOURCES =
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -040027libvnetplugin_la_SOURCES =
Ed Warnickecb9cada2015-12-08 15:45:58 -070028nobase_include_HEADERS =
Dave Barach4e281a42015-12-14 11:13:29 -050029noinst_PROGRAMS =
Filip Tehlar254b0362016-04-07 10:04:34 +020030TESTS =
Ed Warnickecb9cada2015-12-08 15:45:58 -070031
Ole Troand575e692016-08-25 12:26:47 +020032dpdk_libs =
33if WITH_DPDK
34dpdk_libs += -l:libdpdk.a
35endif
36
Ed Warnickecb9cada2015-12-08 15:45:58 -070037########################################
38# Generic stuff
39########################################
40libvnet_la_SOURCES += \
41 vnet/config.c \
Damjan Marion51327ac2016-11-09 11:59:42 +010042 vnet/devices/devices.c \
Damjan Marion0247b462016-06-08 01:37:11 +020043 vnet/handoff.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070044 vnet/interface.c \
Dave Barachaff70772016-10-31 11:59:07 -040045 vnet/interface_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070046 vnet/interface_cli.c \
47 vnet/interface_format.c \
48 vnet/interface_output.c \
49 vnet/misc.c \
50 vnet/replication.c \
51 vnet/rewrite.c
52
53nobase_include_HEADERS += \
54 vnet/api_errno.h \
55 vnet/buffer.h \
56 vnet/config.h \
Damjan Marion8bdc63b2016-11-02 14:48:21 +010057 vnet/devices/devices.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070058 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020059 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070060 vnet/interface.h \
Dave Barachaff70772016-10-31 11:59:07 -040061 vnet/interface.api.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070062 vnet/interface_funcs.h \
63 vnet/l3_types.h \
64 vnet/pipeline.h \
65 vnet/replication.h \
66 vnet/rewrite.h \
Dave Barachaff70772016-10-31 11:59:07 -040067 vnet/vnet.h \
68 vnet/vnet_all_api_h.h \
69 vnet/vnet_msg_enum.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070070
71########################################
72# Policer infra
73########################################
74
75libvnet_la_SOURCES += \
76 vnet/policer/node_funcs.c \
77 vnet/policer/policer.c \
78 vnet/policer/xlate.c
79
80nobase_include_HEADERS += \
81 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070082 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070083 vnet/policer/xlate.h
84
Dave Barachc07bf5d2016-02-17 17:52:26 -050085########################################
86# Cop - junk filter
87########################################
88
89libvnet_la_SOURCES += \
90 vnet/cop/cop.c \
91 vnet/cop/node1.c \
92 vnet/cop/ip4_whitelist.c \
93 vnet/cop/ip6_whitelist.c
94
95nobase_include_HEADERS += \
96 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070097
98########################################
99# Layer 2 protocols go here
100########################################
101
102########################################
103# Layer 2 protocol: Ethernet
104########################################
105libvnet_la_SOURCES += \
106 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700107 vnet/ethernet/format.c \
108 vnet/ethernet/init.c \
109 vnet/ethernet/interface.c \
110 vnet/ethernet/node.c \
111 vnet/ethernet/pg.c
112
113nobase_include_HEADERS += \
114 vnet/ethernet/arp_packet.h \
115 vnet/ethernet/error.def \
116 vnet/ethernet/ethernet.h \
117 vnet/ethernet/packet.h \
118 vnet/ethernet/types.def
119
120########################################
121# Layer 2 protocol: Ethernet bridging
122########################################
123libvnet_la_SOURCES += \
124 vnet/l2/feat_bitmap.c \
Matus Fabianf468e232016-12-02 06:00:53 -0800125 vnet/l2/l2_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700126 vnet/l2/l2_bd.c \
127 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400128 vnet/l2/l2_input_classify.c \
129 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700130 vnet/l2/l2_efp_filter.c \
131 vnet/l2/l2_fib.c \
132 vnet/l2/l2_flood.c \
133 vnet/l2/l2_fwd.c \
134 vnet/l2/l2_input_acl.c \
135 vnet/l2/l2_input.c \
136 vnet/l2/l2_input_vtr.c \
137 vnet/l2/l2_learn.c \
138 vnet/l2/l2_output_acl.c \
139 vnet/l2/l2_output.c \
140 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000141 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700142 vnet/l2/l2_vtr.c \
143 vnet/l2/l2_xcrw.c
144
145nobase_include_HEADERS += \
146 vnet/l2/feat_bitmap.h \
147 vnet/l2/l2_input.h \
148 vnet/l2/l2_output.h \
149 vnet/l2/l2_vtr.h \
150 vnet/l2/l2_input_vtr.h \
151 vnet/l2/l2_efp_filter.h \
152 vnet/l2/l2_fwd.h \
153 vnet/l2/l2_bd.h \
154 vnet/l2/l2_bvi.h \
155 vnet/l2/l2_flood.h \
156 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000157 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700158 vnet/l2/l2_xcrw.h \
Matus Fabianf468e232016-12-02 06:00:53 -0800159 vnet/l2/l2_classify.h \
160 vnet/l2/l2.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700161
162########################################
163# Layer 2 protocol: SRP
164########################################
165libvnet_la_SOURCES += \
166 vnet/srp/format.c \
167 vnet/srp/interface.c \
168 vnet/srp/node.c \
169 vnet/srp/pg.c
170
171nobase_include_HEADERS += \
172 vnet/srp/packet.h \
173 vnet/srp/srp.h
174
175########################################
176# Layer 2 protocol: PPP
177########################################
178libvnet_la_SOURCES += \
179 vnet/ppp/node.c \
180 vnet/ppp/pg.c \
181 vnet/ppp/ppp.c
182
183nobase_include_HEADERS += \
184 vnet/ppp/error.def \
185 vnet/ppp/ppp.h \
186 vnet/ppp/packet.h
187
188########################################
189# Layer 2 protocol: HDLC
190########################################
191libvnet_la_SOURCES += \
192 vnet/hdlc/node.c \
193 vnet/hdlc/pg.c \
194 vnet/hdlc/hdlc.c
195
196nobase_include_HEADERS += \
197 vnet/hdlc/error.def \
198 vnet/hdlc/hdlc.h \
199 vnet/hdlc/packet.h
200
201########################################
202# Layer 2 protocol: LLC
203########################################
204libvnet_la_SOURCES += \
205 vnet/llc/llc.c \
206 vnet/llc/node.c \
207 vnet/llc/pg.c
208
209nobase_include_HEADERS += \
210 vnet/llc/llc.h
211
212########################################
213# Layer 2 protocol: SNAP
214########################################
215libvnet_la_SOURCES += \
216 vnet/snap/snap.c \
217 vnet/snap/node.c \
218 vnet/snap/pg.c
219
220nobase_include_HEADERS += \
221 vnet/snap/snap.h
222
223########################################
224# Layer 2 / vxlan
225########################################
226libvnet_la_SOURCES += \
227 vnet/vxlan/vxlan.c \
228 vnet/vxlan/encap.c \
229 vnet/vxlan/decap.c
230
231nobase_include_HEADERS += \
232 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500233 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700234 vnet/vxlan/vxlan_error.def
235
236########################################
Dave Barachced48e72016-02-08 15:57:35 -0500237# Layer 2 / CDP
238########################################
239libvnet_la_SOURCES += \
240 vnet/cdp/cdp_input.c \
241 vnet/cdp/cdp_node.c \
242 vnet/cdp/cdp_periodic.c
243
244nobase_include_HEADERS += \
245 vnet/cdp/cdp_protocol.h
246
247########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200248# Layer 2 / LLDP
249########################################
250libvnet_la_SOURCES += \
251 vnet/lldp/lldp_input.c \
252 vnet/lldp/lldp_node.c \
253 vnet/lldp/lldp_output.c \
254 vnet/lldp/lldp_cli.c
255
256nobase_include_HEADERS += \
257 vnet/lldp/lldp_protocol.h
258
259########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700260# Layer 2/3 "classify"
261########################################
262libvnet_la_SOURCES += \
263 vnet/classify/vnet_classify.c \
264 vnet/classify/ip_classify.c \
265 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700266 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700267 vnet/classify/flow_classify.c \
268 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700269 vnet/classify/vnet_classify.h
270
271nobase_include_HEADERS += \
272 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700273 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700274 vnet/classify/policer_classify.h \
275 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700276
277########################################
278# Layer 3 protocols go here
279########################################
280
Ed Warnickecb9cada2015-12-08 15:45:58 -0700281########################################
282# Layer 3 protocol: IP v4/v6
283########################################
284libvnet_la_SOURCES += \
285 vnet/ip/format.c \
286 vnet/ip/icmp4.c \
287 vnet/ip/icmp6.c \
288 vnet/ip/ip46_cli.c \
289 vnet/ip/ip4_format.c \
290 vnet/ip/ip4_forward.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700291 vnet/ip/ip4_input.c \
292 vnet/ip/ip4_mtrie.c \
293 vnet/ip/ip4_pg.c \
Dave Barach6f9bca22016-04-30 10:25:32 -0400294 vnet/ip/ip4_source_and_port_range_check.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200295 vnet/ip/ip4_source_check.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700296 vnet/ip/ip6_format.c \
297 vnet/ip/ip6_forward.c \
298 vnet/ip/ip6_hop_by_hop.c \
299 vnet/ip/ip6_input.c \
300 vnet/ip/ip6_neighbor.c \
301 vnet/ip/ip6_pg.c \
302 vnet/ip/ip_checksum.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200303 vnet/ip/ip_frag.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700304 vnet/ip/ip.h \
305 vnet/ip/ip_init.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200306 vnet/ip/ip_input_acl.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700307 vnet/ip/lookup.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200308 vnet/ip/ping.c \
309 vnet/ip/punt.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700310 vnet/ip/udp_format.c \
311 vnet/ip/udp_init.c \
312 vnet/ip/udp_local.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200313 vnet/ip/udp_pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700314
315nobase_include_HEADERS += \
316 vnet/ip/format.h \
317 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100318 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700319 vnet/ip/icmp6.h \
320 vnet/ip/igmp_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200321 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700322 vnet/ip/ip4.h \
323 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700324 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700325 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200326 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700327 vnet/ip/ip6_hop_by_hop.h \
328 vnet/ip/ip6_hop_by_hop_packet.h \
329 vnet/ip/ip6_packet.h \
Pavel Kotucek3e046ea2016-12-05 08:27:37 +0100330 vnet/ip/ip6_neighbor.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200331 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700332 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200333 vnet/ip/ip_source_and_port_range_check.h \
334 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700335 vnet/ip/ports.def \
336 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700337 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200338 vnet/ip/punt.h \
339 vnet/ip/tcp_packet.h \
340 vnet/ip/udp_error.def \
341 vnet/ip/udp.h \
342 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700343
344########################################
345# Layer 3 protocol: IPSec
346########################################
Dave Barach61efa142016-01-22 08:23:09 -0500347if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700348libvnet_la_SOURCES += \
349 vnet/ipsec/ipsec.c \
350 vnet/ipsec/ipsec_cli.c \
351 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700352 vnet/ipsec/ipsec_input.c \
353 vnet/ipsec/ipsec_if.c \
354 vnet/ipsec/ipsec_if_in.c \
355 vnet/ipsec/ipsec_if_out.c \
356 vnet/ipsec/esp_encrypt.c \
357 vnet/ipsec/esp_decrypt.c \
358 vnet/ipsec/ikev2.c \
359 vnet/ipsec/ikev2_crypto.c \
360 vnet/ipsec/ikev2_cli.c \
361 vnet/ipsec/ikev2_payload.c \
362 vnet/ipsec/ikev2_format.c
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000363if WITH_DPDK_CRYPTO
364libvnet_la_SOURCES += \
365 vnet/devices/dpdk/ipsec/esp_encrypt.c \
366 vnet/devices/dpdk/ipsec/esp_decrypt.c \
367 vnet/devices/dpdk/ipsec/crypto_node.c \
368 vnet/devices/dpdk/ipsec/cli.c \
369 vnet/devices/dpdk/ipsec/ipsec.c
370endif
371endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700372
Damjan Marione936bbe2016-02-25 23:17:38 +0100373libvnet_la_SOURCES += \
374 vnet/ipsec/ipsec_output.c
375
Ed Warnickecb9cada2015-12-08 15:45:58 -0700376nobase_include_HEADERS += \
377 vnet/ipsec/ipsec.h \
378 vnet/ipsec/esp.h \
379 vnet/ipsec/ikev2.h \
380 vnet/ipsec/ikev2_priv.h
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000381if WITH_DPDK_CRYPTO
382nobase_include_HEADERS += \
383 vnet/devices/dpdk/ipsec/ipsec.h \
384 vnet/devices/dpdk/ipsec/esp.h
385endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700386
387########################################
388# Layer 3 protocol: osi
389########################################
390libvnet_la_SOURCES += \
391 vnet/osi/node.c \
392 vnet/osi/osi.c \
393 vnet/osi/pg.c
394
395nobase_include_HEADERS += \
396 vnet/osi/osi.h
397
398########################################
399# Layer 3 protocol: MAP
400########################################
Ole Troanf0c90e22016-12-06 12:50:08 +0100401libvnet_la_SOURCES += \
402 vnet/map/map.c \
403 vnet/map/map_dpo.c \
404 vnet/map/ip4_map.c \
405 vnet/map/ip6_map.c \
406 vnet/map/ip4_map_t.c \
407 vnet/map/ip6_map_t.c \
408 vnet/map/map_api.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700409
Ole Troanf0c90e22016-12-06 12:50:08 +0100410nobase_include_HEADERS += \
411 vnet/map/map.h \
412 vnet/map/map_dpo.h \
413 vnet/map/map.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700414
Ole Troand575e692016-08-25 12:26:47 +0200415if ENABLE_TESTS
416TESTS += test_map
417test_map_SOURCES = \
418 vnet/map/test.c
419test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
420
421test_map_LDADD = libvnet.la -lvppinfra -lvlib \
422 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
423 -ldl -lsvm -lrt
424
425test_map_LDFLAGS = -static
426endif
427
428
Ed Warnickecb9cada2015-12-08 15:45:58 -0700429########################################
430# Tunnel protocol: gre
431########################################
432libvnet_la_SOURCES += \
433 vnet/gre/gre.c \
434 vnet/gre/node.c \
435 vnet/gre/interface.c \
436 vnet/gre/pg.c
437
438nobase_include_HEADERS += \
439 vnet/gre/gre.h \
440 vnet/gre/packet.h \
441 vnet/gre/error.def
442
443########################################
444# Tunnel protocol: l2tpv3
445########################################
446libvnet_la_SOURCES += \
447 vnet/l2tp/l2tp.c \
448 vnet/l2tp/encap.c \
449 vnet/l2tp/decap.c \
450 vnet/l2tp/pg.c
451
452nobase_include_HEADERS += \
453 vnet/l2tp/l2tp.h \
454 vnet/l2tp/packet.h
455
456########################################
457# Tunnel protocol: gre+mpls
458########################################
459libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100460 vnet/mpls/mpls.c \
461 vnet/mpls/mpls_lookup.c \
462 vnet/mpls/mpls_output.c \
463 vnet/mpls/mpls_features.c \
464 vnet/mpls/node.c \
465 vnet/mpls/interface.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000466 vnet/mpls/mpls_tunnel.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100467 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700468
469nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100470 vnet/mpls/mpls.h \
471 vnet/mpls/mpls_types.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000472 vnet/mpls/mpls_tunnel.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100473 vnet/mpls/packet.h \
474 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700475
476
477########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700478# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700479########################################
480
481libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700482 vnet/vxlan-gpe/vxlan_gpe.c \
483 vnet/vxlan-gpe/encap.c \
484 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700485
486nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700487 vnet/vxlan-gpe/vxlan_gpe.h \
488 vnet/vxlan-gpe/vxlan_gpe_packet.h \
489 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700490
491########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700492# Tunnel protocol: ipsec+gre
493########################################
494libvnet_la_SOURCES += \
495 vnet/ipsec-gre/ipsec_gre.c \
496 vnet/ipsec-gre/node.c \
497 vnet/ipsec-gre/interface.c
498
499nobase_include_HEADERS += \
500 vnet/ipsec-gre/ipsec_gre.h \
501 vnet/ipsec-gre/error.def
502
503########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100504# LISP control plane: lisp-cp
505########################################
506
507libvnet_la_SOURCES += \
508 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100509 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100510 vnet/lisp-cp/control.c \
511 vnet/lisp-cp/gid_dictionary.c \
512 vnet/lisp-cp/lisp_msg_serdes.c \
513 vnet/lisp-cp/packets.c
514
515nobase_include_HEADERS += \
516 vnet/lisp-cp/lisp_types.h \
517 vnet/lisp-cp/packets.h \
518 vnet/lisp-cp/gid_dictionary.h \
519 vnet/lisp-cp/lisp_cp_messages.h \
520 vnet/lisp-cp/lisp_msg_serdes.h \
521 vnet/lisp-cp/control.h
522
Filip Tehlar254b0362016-04-07 10:04:34 +0200523
524if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200525LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200526 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
527
528TESTS += test_cp_serdes test_lisp_types
529
530test_cp_serdes_SOURCES = \
531 test/lisp-cp/test_cp_serdes.c \
532 vnet/lisp-cp/lisp_msg_serdes.c \
533 vnet/lisp-cp/lisp_types.c \
534 vnet/lisp-cp/packets.c \
535 vnet/ip/ip_checksum.c
536
537test_lisp_types_SOURCES = \
538 test/lisp-cp/test_lisp_types.c \
539 vnet/lisp-cp/lisp_types.c
540
541test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
542test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
543
544test_cp_serdes_LDADD = libvnet.la $(LDS)
545test_lisp_types_LDADD = libvnet.la $(LDS)
546
547test_cp_serdes_LDFLAGS = -static
548test_lisp_types_LDFLAGS = -static
549endif
550
Florin Corase127a7e2016-02-18 22:20:01 +0100551########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700552# Tunnel protocol: lisp-gpe
553########################################
554
555libvnet_la_SOURCES += \
556 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100557 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
558 vnet/lisp-gpe/lisp_gpe_adjacency.c \
559 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100560 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
561 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200562 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100563 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700564
565nobase_include_HEADERS += \
566 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100567 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
568 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700569 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100570 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700571
Filip Tehlar254b0362016-04-07 10:04:34 +0200572if ENABLE_TESTS
573TESTS += test_test
574
575test_test_SOURCES = test/lisp-gpe/test.c
576
577test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
578
579test_test_LDADD = $(LIBOBJS)
580
581noinst_PROGRAMS += $(TESTS)
582check_PROGRAMS = $(TESTS)
583endif
584
Ed Warnickecb9cada2015-12-08 15:45:58 -0700585########################################
586# DHCP client
587########################################
588libvnet_la_SOURCES += \
589 vnet/dhcp/client.c \
590 vnet/dhcp/client.h
591
592nobase_include_HEADERS += \
593 vnet/dhcp/client.h
594
595########################################
596# DHCP proxy
597########################################
598libvnet_la_SOURCES += \
599 vnet/dhcp/proxy_node.c \
600 vnet/dhcp/proxy.h
601
602nobase_include_HEADERS += \
603 vnet/dhcp/packet.h \
604 vnet/dhcp/proxy.h \
605 vnet/dhcp/proxy_error.def
606
607########################################
608# ipv6 segment routing
609########################################
Dave Barach61efa142016-01-22 08:23:09 -0500610
611if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700612libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700613 vnet/sr/sr.c \
614 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500615endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700616
617nobase_include_HEADERS += \
618 vnet/sr/sr_packet.h \
619 vnet/sr/sr_error.def \
620 vnet/sr/sr.h
621
622########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700623# DHCPv6 proxy
624########################################
625libvnet_la_SOURCES += \
626 vnet/dhcpv6/proxy_node.c
627
628nobase_include_HEADERS += \
629 vnet/dhcpv6/packet.h \
630 vnet/dhcpv6/proxy.h \
631 vnet/dhcpv6/proxy_error.def
632
633########################################
634# IPFIX / netflow v10
635########################################
636libvnet_la_SOURCES += \
637 vnet/flow/flow_report.c
638
639nobase_include_HEADERS += \
640 vnet/flow/flow_report.h \
641 vnet/flow/ipfix_info_elements.h \
642 vnet/flow/ipfix_packet.h
643
644########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700645# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700646########################################
647
648libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700649 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700650
651nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700652 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700653
654########################################
655# lawful intercept
656########################################
657
658libvnet_la_SOURCES += \
659 vnet/lawful-intercept/lawful_intercept.c \
660 vnet/lawful-intercept/node.c
661
662nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700663 vnet/lawful-intercept/lawful_intercept.h
664
665########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100666# SPAN (port mirroring)
667########################################
668
669libvnet_la_SOURCES += \
670 vnet/span/span.c \
671 vnet/span/node.c
672
673nobase_include_HEADERS += \
674 vnet/span/span.h
675
676########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700677# Packet generator
678########################################
679
680libvnet_la_SOURCES += \
681 vnet/pg/cli.c \
682 vnet/pg/edit.c \
683 vnet/pg/init.c \
684 vnet/pg/input.c \
685 vnet/pg/output.c \
686 vnet/pg/stream.c
687
688nobase_include_HEADERS += \
689 vnet/pg/pg.h \
690 vnet/pg/edit.h
691
692########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000693# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700694########################################
695if WITH_DPDK
696libvnet_la_SOURCES += \
697 vnet/devices/dpdk/dpdk_priv.h \
698 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100699 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700700 vnet/devices/dpdk/init.c \
701 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100702 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700703 vnet/devices/dpdk/cli.c
704
705nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200706 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200707else
708libvnet_la_SOURCES += \
709 vnet/devices/nic/ixge.c \
710 vnet/devices/nic/ixge.h \
711 vnet/devices/nic/sfp.c \
712 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700713endif
714
715########################################
716# virtio
717########################################
718
Ed Warnickecb9cada2015-12-08 15:45:58 -0700719libvnet_la_SOURCES += \
720 vnet/devices/virtio/vhost-user.c
721
722nobase_include_HEADERS += \
723 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700724
725########################################
726# ssvm ethernet
727########################################
728libvnet_la_SOURCES += \
729 vnet/devices/ssvm/ssvm_eth.c \
730 vnet/devices/ssvm/node.c
731
732nobase_include_HEADERS += \
733 vnet/devices/ssvm/ssvm_eth.h
734
735########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100736# Linux packet interface
737########################################
738
739libvnet_la_SOURCES += \
740 vnet/devices/af_packet/af_packet.c \
741 vnet/devices/af_packet/device.c \
742 vnet/devices/af_packet/node.c \
743 vnet/devices/af_packet/cli.c
744
745nobase_include_HEADERS += \
746 vnet/devices/af_packet/af_packet.h
747
748########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200749# NETMAP interface
750########################################
751
752libvnet_la_SOURCES += \
753 vnet/devices/netmap/netmap.c \
754 vnet/devices/netmap/device.c \
755 vnet/devices/netmap/node.c \
756 vnet/devices/netmap/cli.c
757
758nobase_include_HEADERS += \
759 vnet/devices/netmap/netmap.h
760
761
762########################################
Damjan Marion22311502016-10-28 20:30:15 +0200763# Driver feature graph arc support
764########################################
765
766libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200767 vnet/feature/feature.c \
768 vnet/feature/registration.c
769
770nobase_include_HEADERS += \
771 vnet/feature/feature.h
772
773########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700774# Unix kernel related
775########################################
776
777# FIXME: vnet/unix/hgshm.c
778
779libvnet_la_SOURCES += \
780 vnet/unix/gdb_funcs.c \
781 vnet/unix/pcap.c \
782 vnet/unix/tapcli.c \
783 vnet/unix/tuntap.c
784
785nobase_include_HEADERS += \
786 vnet/unix/pcap.h \
787 vnet/unix/tuntap.h \
788 vnet/unix/tapcli.h
789
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400790########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100791# FIB
792########################################
793
794libvnet_la_SOURCES += \
795 vnet/fib/fib.c \
796 vnet/fib/fib_test.c \
797 vnet/fib/ip4_fib.c \
798 vnet/fib/ip6_fib.c \
799 vnet/fib/mpls_fib.c \
800 vnet/fib/fib_table.c \
801 vnet/fib/fib_walk.c \
802 vnet/fib/fib_types.c \
803 vnet/fib/fib_node.c \
804 vnet/fib/fib_node_list.c \
805 vnet/fib/fib_entry.c \
806 vnet/fib/fib_entry_src.c \
807 vnet/fib/fib_entry_src_rr.c \
808 vnet/fib/fib_entry_src_interface.c \
809 vnet/fib/fib_entry_src_default_route.c \
810 vnet/fib/fib_entry_src_special.c \
811 vnet/fib/fib_entry_src_api.c \
812 vnet/fib/fib_entry_src_adj.c \
813 vnet/fib/fib_entry_src_mpls.c \
814 vnet/fib/fib_entry_src_lisp.c \
815 vnet/fib/fib_entry_cover.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000816 vnet/fib/fib_entry_delegate.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100817 vnet/fib/fib_path_list.c \
818 vnet/fib/fib_path.c \
819 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100820 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100821 vnet/fib/fib_attached_export.c
822
823nobase_include_HEADERS += \
824 vnet/fib/fib.h \
825 vnet/fib/ip4_fib.h \
826 vnet/fib/ip6_fib.h \
827 vnet/fib/fib_types.h \
828 vnet/fib/fib_table.h \
829 vnet/fib/fib_node.h \
830 vnet/fib/fib_node_list.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000831 vnet/fib/fib_entry.h \
832 vnet/fib/fib_entry_delegate.h
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100833
834########################################
835# ADJ
836########################################
837
838libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100839 vnet/adj/adj_nbr.c \
840 vnet/adj/adj_rewrite.c \
841 vnet/adj/adj_glean.c \
842 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100843 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100844 vnet/adj/adj.c
845
846nobase_include_HEADERS += \
847 vnet/adj/adj.h \
848 vnet/adj/adj_types.h \
849 vnet/adj/adj_rewrite.h \
850 vnet/adj/adj_glean.h \
851 vnet/adj/adj_nbr.h
852
853########################################
854# Data-Plane Objects
855########################################
856
857libvnet_la_SOURCES += \
858 vnet/dpo/dpo.c \
859 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100860 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100861 vnet/dpo/punt_dpo.c \
862 vnet/dpo/receive_dpo.c \
863 vnet/dpo/load_balance.c \
864 vnet/dpo/load_balance_map.c \
865 vnet/dpo/lookup_dpo.c \
866 vnet/dpo/classify_dpo.c \
867 vnet/dpo/mpls_label_dpo.c
868
869nobase_include_HEADERS += \
870 vnet/dpo/load_balance.h \
871 vnet/dpo/drop_dpo.h \
872 vnet/dpo/lookup_dpo.h \
873 vnet/dpo/punt_dpo.h \
874 vnet/dpo/classify_dpo.h \
875 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100876 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100877 vnet/dpo/dpo.h
878
879########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400880# Plugin client library
881########################################
882
883libvnetplugin_la_SOURCES += \
884 vnet/plugin/p1.c
885
886nobase_include_HEADERS += \
887 vnet/plugin/plugin.h
888
889lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700890
Ed Warnickecb9cada2015-12-08 15:45:58 -0700891pcap2pg_SOURCES = \
892 vnet/unix/pcap2pg.c \
893 vnet/unix/pcap.h
894
895pcap2pg_LDFLAGS = -static
896pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
897
898noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400899
900# Set the suffix list
Ole Troanf14e3bf2016-12-01 21:49:03 +0100901SUFFIXES = .api.h .api .api.json
Dave Barachaff70772016-10-31 11:59:07 -0400902
903# install the API definition, so we can produce java bindings, etc.
904
Ole Troanf14e3bf2016-12-01 21:49:03 +0100905apidir = $(prefix)/vnet
Ole Troanf0c90e22016-12-06 12:50:08 +0100906api_DATA = \
907 vnet/interface.api.json \
908 vnet/l2/l2.api.json \
909 vnet/map/map.api.json
Dave Barachaff70772016-10-31 11:59:07 -0400910
911# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
912# and requires a symbolic link at the top of the vnet source tree
913
914include $(top_srcdir)/suffix-rules.mk