blob: 9b148f69ffab237b8d98fe945667f90019c9f5dc [file] [log] [blame]
Damjan Marion7cd468a2016-12-19 23:05:39 +01001# 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
Damjan Marion724f64c2017-01-11 11:11:00 +010014lib_LTLIBRARIES += libvnet.la
15
Damjan Marion7cd468a2016-12-19 23:05:39 +010016libvnet_la_SOURCES =
Damjan Marionc74a86a2017-01-16 14:00:03 +010017libvnet_la_DEPENDENCIES = \
18 libvppinfra.la \
19 libvlib.la \
20 libsvmdb.la \
21 libsvm.la \
22 libvlibapi.la \
23 libvlibmemory.la \
24 libvlibmemoryclient.la
Damjan Marion7cd468a2016-12-19 23:05:39 +010025
Damjan Marionc74a86a2017-01-16 14:00:03 +010026libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt $(DPDK_LD_ADD)
27libvnet_la_LDFLAGS = $(DPDK_LD_FLAGS)
Damjan Marion45a00c42017-01-08 15:34:50 +010028
Damjan Mariona9a951f2017-01-16 22:06:10 +010029if WITH_LIBSSL
Damjan Marion45a00c42017-01-08 15:34:50 +010030libvnet_la_LIBADD += -lcrypto
31endif
Damjan Marion7cd468a2016-12-19 23:05:39 +010032
33########################################
34# Generic stuff
35########################################
36libvnet_la_SOURCES += \
37 vnet/config.c \
38 vnet/devices/devices.c \
39 vnet/handoff.c \
40 vnet/interface.c \
41 vnet/interface_api.c \
42 vnet/interface_cli.c \
43 vnet/interface_format.c \
44 vnet/interface_output.c \
45 vnet/misc.c \
46 vnet/replication.c \
47 vnet/rewrite.c
48
49nobase_include_HEADERS += \
50 vnet/api_errno.h \
51 vnet/buffer.h \
52 vnet/config.h \
53 vnet/devices/devices.h \
54 vnet/global_funcs.h \
55 vnet/handoff.h \
56 vnet/interface.h \
57 vnet/interface.api.h \
58 vnet/interface_funcs.h \
59 vnet/l3_types.h \
60 vnet/pipeline.h \
61 vnet/replication.h \
62 vnet/rewrite.h \
63 vnet/vnet.h \
64 vnet/vnet_all_api_h.h \
Gabriel Ganne5842c782017-01-30 13:44:04 +010065 vnet/vnet_msg_enum.h \
66 vnet/util/radix.h
Damjan Marion7cd468a2016-12-19 23:05:39 +010067
68API_FILES += vnet/interface.api
69
70########################################
71# Policer infra
72########################################
73
74libvnet_la_SOURCES += \
75 vnet/policer/node_funcs.c \
76 vnet/policer/policer.c \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010077 vnet/policer/xlate.c \
78 vnet/policer/policer_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010079
80nobase_include_HEADERS += \
81 vnet/policer/police.h \
82 vnet/policer/policer.h \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010083 vnet/policer/xlate.h \
84 vnet/policer/policer.api.h
85
86API_FILES += vnet/policer/policer.api
Damjan Marion7cd468a2016-12-19 23:05:39 +010087
88########################################
89# Cop - junk filter
90########################################
91
92libvnet_la_SOURCES += \
93 vnet/cop/cop.c \
94 vnet/cop/node1.c \
95 vnet/cop/ip4_whitelist.c \
Pavel Kotucek884cf262017-01-25 08:27:15 +010096 vnet/cop/ip6_whitelist.c \
97 vnet/cop/cop_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010098
99nobase_include_HEADERS += \
Pavel Kotucek884cf262017-01-25 08:27:15 +0100100 vnet/cop/cop.h \
101 vnet/cop/cop.api.h
102
103API_FILES += vnet/cop/cop.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100104
105########################################
106# Layer 2 protocols go here
107########################################
108
109########################################
110# Layer 2 protocol: Ethernet
111########################################
112libvnet_la_SOURCES += \
113 vnet/ethernet/arp.c \
114 vnet/ethernet/format.c \
115 vnet/ethernet/init.c \
116 vnet/ethernet/interface.c \
117 vnet/ethernet/node.c \
118 vnet/ethernet/pg.c
119
120nobase_include_HEADERS += \
121 vnet/ethernet/arp_packet.h \
122 vnet/ethernet/error.def \
123 vnet/ethernet/ethernet.h \
124 vnet/ethernet/packet.h \
125 vnet/ethernet/types.def
126
127########################################
128# Layer 2 protocol: Ethernet bridging
129########################################
130libvnet_la_SOURCES += \
131 vnet/l2/feat_bitmap.c \
132 vnet/l2/l2_api.c \
133 vnet/l2/l2_bd.c \
134 vnet/l2/l2_bvi.c \
135 vnet/l2/l2_input_classify.c \
136 vnet/l2/l2_output_classify.c \
137 vnet/l2/l2_efp_filter.c \
138 vnet/l2/l2_fib.c \
139 vnet/l2/l2_flood.c \
140 vnet/l2/l2_fwd.c \
141 vnet/l2/l2_input_acl.c \
142 vnet/l2/l2_input.c \
143 vnet/l2/l2_input_vtr.c \
144 vnet/l2/l2_learn.c \
145 vnet/l2/l2_output_acl.c \
146 vnet/l2/l2_output.c \
147 vnet/l2/l2_patch.c \
148 vnet/l2/l2_rw.c \
149 vnet/l2/l2_vtr.c \
150 vnet/l2/l2_xcrw.c
151
152nobase_include_HEADERS += \
153 vnet/l2/feat_bitmap.h \
154 vnet/l2/l2_input.h \
155 vnet/l2/l2_output.h \
156 vnet/l2/l2_vtr.h \
157 vnet/l2/l2_input_vtr.h \
158 vnet/l2/l2_efp_filter.h \
159 vnet/l2/l2_fwd.h \
160 vnet/l2/l2_bd.h \
161 vnet/l2/l2_bvi.h \
162 vnet/l2/l2_flood.h \
163 vnet/l2/l2_fib.h \
164 vnet/l2/l2_rw.h \
165 vnet/l2/l2_xcrw.h \
166 vnet/l2/l2_classify.h \
167 vnet/l2/l2.api.h
168
169API_FILES += vnet/l2/l2.api
170
171########################################
172# Layer 2 protocol: SRP
173########################################
174libvnet_la_SOURCES += \
175 vnet/srp/format.c \
176 vnet/srp/interface.c \
177 vnet/srp/node.c \
178 vnet/srp/pg.c
179
180nobase_include_HEADERS += \
181 vnet/srp/packet.h \
182 vnet/srp/srp.h
183
184########################################
185# Layer 2 protocol: PPP
186########################################
187libvnet_la_SOURCES += \
188 vnet/ppp/node.c \
189 vnet/ppp/pg.c \
190 vnet/ppp/ppp.c
191
192nobase_include_HEADERS += \
193 vnet/ppp/error.def \
194 vnet/ppp/ppp.h \
195 vnet/ppp/packet.h
196
197########################################
198# Layer 2 protocol: HDLC
199########################################
200libvnet_la_SOURCES += \
201 vnet/hdlc/node.c \
202 vnet/hdlc/pg.c \
203 vnet/hdlc/hdlc.c
204
205nobase_include_HEADERS += \
206 vnet/hdlc/error.def \
207 vnet/hdlc/hdlc.h \
208 vnet/hdlc/packet.h
209
210########################################
211# Layer 2 protocol: LLC
212########################################
213libvnet_la_SOURCES += \
214 vnet/llc/llc.c \
215 vnet/llc/node.c \
216 vnet/llc/pg.c
217
218nobase_include_HEADERS += \
219 vnet/llc/llc.h
220
221########################################
222# Layer 2 protocol: SNAP
223########################################
224libvnet_la_SOURCES += \
225 vnet/snap/snap.c \
226 vnet/snap/node.c \
227 vnet/snap/pg.c
228
229nobase_include_HEADERS += \
230 vnet/snap/snap.h
231
232########################################
233# Layer 2 / vxlan
234########################################
235libvnet_la_SOURCES += \
236 vnet/vxlan/vxlan.c \
237 vnet/vxlan/encap.c \
238 vnet/vxlan/decap.c \
239 vnet/vxlan/vxlan_api.c
240
241nobase_include_HEADERS += \
242 vnet/vxlan/vxlan.h \
243 vnet/vxlan/vxlan_packet.h \
244 vnet/vxlan/vxlan_error.def \
245 vnet/vxlan/vxlan.api.h
246
247API_FILES += vnet/vxlan/vxlan.api
248
249########################################
250# Layer 2 / CDP
251########################################
252libvnet_la_SOURCES += \
253 vnet/cdp/cdp_input.c \
254 vnet/cdp/cdp_node.c \
255 vnet/cdp/cdp_periodic.c
256
257nobase_include_HEADERS += \
258 vnet/cdp/cdp_protocol.h
259
260########################################
261# Layer 2 / LLDP
262########################################
263libvnet_la_SOURCES += \
264 vnet/lldp/lldp_input.c \
265 vnet/lldp/lldp_node.c \
266 vnet/lldp/lldp_output.c \
267 vnet/lldp/lldp_cli.c
268
269nobase_include_HEADERS += \
270 vnet/lldp/lldp_protocol.h
271
272########################################
273# Layer 2/3 "classify"
274########################################
275libvnet_la_SOURCES += \
276 vnet/classify/vnet_classify.c \
277 vnet/classify/ip_classify.c \
278 vnet/classify/input_acl.c \
279 vnet/classify/policer_classify.c \
280 vnet/classify/flow_classify.c \
281 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100282 vnet/classify/vnet_classify.h \
283 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100284
285nobase_include_HEADERS += \
286 vnet/classify/vnet_classify.h \
287 vnet/classify/input_acl.h \
288 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100289 vnet/classify/flow_classify.h \
290 vnet/classify/classify.api.h
291
292API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100293
294########################################
295# Layer 3 protocols go here
296########################################
297
298########################################
299# Layer 3 protocol: IP v4/v6
300########################################
301libvnet_la_SOURCES += \
302 vnet/ip/format.c \
303 vnet/ip/icmp4.c \
304 vnet/ip/icmp6.c \
305 vnet/ip/ip46_cli.c \
306 vnet/ip/ip4_format.c \
307 vnet/ip/ip4_forward.c \
308 vnet/ip/ip4_input.c \
309 vnet/ip/ip4_mtrie.c \
310 vnet/ip/ip4_pg.c \
311 vnet/ip/ip4_source_and_port_range_check.c \
312 vnet/ip/ip4_source_check.c \
313 vnet/ip/ip6_format.c \
314 vnet/ip/ip6_forward.c \
315 vnet/ip/ip6_hop_by_hop.c \
316 vnet/ip/ip6_input.c \
317 vnet/ip/ip6_neighbor.c \
318 vnet/ip/ip6_pg.c \
319 vnet/ip/ip_api.c \
320 vnet/ip/ip_checksum.c \
321 vnet/ip/ip_frag.c \
322 vnet/ip/ip.h \
323 vnet/ip/ip_init.c \
324 vnet/ip/ip_input_acl.c \
325 vnet/ip/lookup.c \
326 vnet/ip/ping.c \
327 vnet/ip/punt.c \
328 vnet/ip/udp_format.c \
329 vnet/ip/udp_init.c \
330 vnet/ip/udp_local.c \
331 vnet/ip/udp_pg.c
332
333nobase_include_HEADERS += \
334 vnet/ip/format.h \
335 vnet/ip/icmp46_packet.h \
336 vnet/ip/icmp4.h \
337 vnet/ip/icmp6.h \
338 vnet/ip/igmp_packet.h \
339 vnet/ip/ip.api.h \
340 vnet/ip/ip4_error.h \
341 vnet/ip/ip4.h \
342 vnet/ip/ip4_mtrie.h \
343 vnet/ip/ip4_packet.h \
344 vnet/ip/ip6_error.h \
345 vnet/ip/ip6.h \
346 vnet/ip/ip6_hop_by_hop.h \
347 vnet/ip/ip6_hop_by_hop_packet.h \
348 vnet/ip/ip6_packet.h \
349 vnet/ip/ip6_neighbor.h \
350 vnet/ip/ip.h \
351 vnet/ip/ip_packet.h \
352 vnet/ip/ip_source_and_port_range_check.h \
353 vnet/ip/lookup.h \
354 vnet/ip/ports.def \
355 vnet/ip/protocols.def \
356 vnet/ip/punt_error.def \
357 vnet/ip/punt.h \
358 vnet/ip/tcp_packet.h \
359 vnet/ip/udp_error.def \
360 vnet/ip/udp.h \
361 vnet/ip/udp_packet.h
362
363API_FILES += vnet/ip/ip.api
364
365########################################
366# Bidirectional Forwarding Detection
367########################################
368
369nobase_include_HEADERS += \
370 vnet/bfd/bfd_protocol.h \
371 vnet/bfd/bfd_main.h \
372 vnet/bfd/bfd_api.h \
373 vnet/bfd/bfd_udp.h \
374 vnet/bfd/bfd.api.h
375
376libvnet_la_SOURCES += \
377 vnet/bfd/bfd_api.h \
378 vnet/bfd/bfd_udp.c \
379 vnet/bfd/bfd_main.c \
380 vnet/bfd/bfd_protocol.c \
381 vnet/bfd/bfd_api.c
382
383API_FILES += vnet/bfd/bfd.api
384
385########################################
386# Layer 3 protocol: IPSec
387########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100388if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100389libvnet_la_SOURCES += \
390 vnet/ipsec/ipsec.c \
391 vnet/ipsec/ipsec_cli.c \
392 vnet/ipsec/ipsec_format.c \
393 vnet/ipsec/ipsec_input.c \
394 vnet/ipsec/ipsec_if.c \
395 vnet/ipsec/ipsec_if_in.c \
396 vnet/ipsec/ipsec_if_out.c \
397 vnet/ipsec/esp_encrypt.c \
398 vnet/ipsec/esp_decrypt.c \
399 vnet/ipsec/ikev2.c \
400 vnet/ipsec/ikev2_crypto.c \
401 vnet/ipsec/ikev2_cli.c \
402 vnet/ipsec/ikev2_payload.c \
403 vnet/ipsec/ikev2_format.c \
404 vnet/ipsec/ipsec_api.c
405
406API_FILES += vnet/ipsec/ipsec.api
407
Sergio Gonzalez Monroyd04b60b2017-01-20 15:35:23 +0000408if WITH_DPDK
Damjan Marion7cd468a2016-12-19 23:05:39 +0100409libvnet_la_SOURCES += \
410 vnet/devices/dpdk/ipsec/esp_encrypt.c \
411 vnet/devices/dpdk/ipsec/esp_decrypt.c \
412 vnet/devices/dpdk/ipsec/crypto_node.c \
413 vnet/devices/dpdk/ipsec/cli.c \
414 vnet/devices/dpdk/ipsec/ipsec.c
415endif
416endif
417
418libvnet_la_SOURCES += \
419 vnet/ipsec/ipsec_output.c
420
421nobase_include_HEADERS += \
422 vnet/ipsec/ipsec.h \
423 vnet/ipsec/esp.h \
424 vnet/ipsec/ikev2.h \
425 vnet/ipsec/ikev2_priv.h \
426 vnet/ipsec/ipsec.api.h
Sergio Gonzalez Monroyd04b60b2017-01-20 15:35:23 +0000427if WITH_DPDK
Damjan Marion7cd468a2016-12-19 23:05:39 +0100428nobase_include_HEADERS += \
429 vnet/devices/dpdk/ipsec/ipsec.h \
430 vnet/devices/dpdk/ipsec/esp.h
431endif
432
433########################################
434# Layer 3 protocol: osi
435########################################
436libvnet_la_SOURCES += \
437 vnet/osi/node.c \
438 vnet/osi/osi.c \
439 vnet/osi/pg.c
440
441nobase_include_HEADERS += \
442 vnet/osi/osi.h
443
444########################################
445# Layer 3 protocol: MAP
446########################################
447libvnet_la_SOURCES += \
448 vnet/map/map.c \
449 vnet/map/map_dpo.c \
450 vnet/map/ip4_map.c \
451 vnet/map/ip6_map.c \
452 vnet/map/ip4_map_t.c \
453 vnet/map/ip6_map_t.c \
454 vnet/map/map_api.c
455
456nobase_include_HEADERS += \
457 vnet/map/map.h \
458 vnet/map/map_dpo.h \
459 vnet/map/map.api.h
460
461API_FILES += vnet/map/map.api
462
463if ENABLE_TESTS
464TESTS += test_map
465test_map_SOURCES = \
466 vnet/map/test.c
467test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
468
469test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Damjan Marion0eca04d2017-01-03 20:11:35 +0100470 -lpthread -lvlibmemory -lvlibapi \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100471 -ldl -lsvm -lrt
472
473test_map_LDFLAGS = -static
474endif
475
476
477########################################
478# Tunnel protocol: gre
479########################################
480libvnet_la_SOURCES += \
481 vnet/gre/gre.c \
482 vnet/gre/node.c \
483 vnet/gre/interface.c \
484 vnet/gre/pg.c \
485 vnet/gre/gre_api.c
486
487nobase_include_HEADERS += \
488 vnet/gre/gre.h \
489 vnet/gre/packet.h \
490 vnet/gre/error.def \
491 vnet/gre/gre.api.h
492
493API_FILES += vnet/gre/gre.api
494
495########################################
496# Tunnel protocol: l2tpv3
497########################################
498libvnet_la_SOURCES += \
499 vnet/l2tp/l2tp.c \
500 vnet/l2tp/encap.c \
501 vnet/l2tp/decap.c \
502 vnet/l2tp/pg.c \
503 vnet/l2tp/l2tp_api.c
504
505nobase_include_HEADERS += \
506 vnet/l2tp/l2tp.h \
507 vnet/l2tp/packet.h \
508 vnet/l2tp/l2tp.api.h
509
510API_FILES += vnet/l2tp/l2tp.api
511
512########################################
513# Tunnel protocol: gre+mpls
514########################################
515libvnet_la_SOURCES += \
516 vnet/mpls/mpls.c \
517 vnet/mpls/mpls_lookup.c \
518 vnet/mpls/mpls_output.c \
519 vnet/mpls/mpls_features.c \
520 vnet/mpls/node.c \
521 vnet/mpls/interface.c \
522 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100523 vnet/mpls/pg.c \
524 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100525
526nobase_include_HEADERS += \
527 vnet/mpls/mpls.h \
528 vnet/mpls/mpls_types.h \
529 vnet/mpls/mpls_tunnel.h \
530 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100531 vnet/mpls/error.def \
532 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100533
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100534API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100535
536########################################
537# Tunnel protocol: vxlan-gpe
538########################################
539
540libvnet_la_SOURCES += \
541 vnet/vxlan-gpe/vxlan_gpe.c \
542 vnet/vxlan-gpe/encap.c \
543 vnet/vxlan-gpe/decap.c \
544 vnet/vxlan-gpe/vxlan_gpe_api.c
545
546nobase_include_HEADERS += \
547 vnet/vxlan-gpe/vxlan_gpe.h \
548 vnet/vxlan-gpe/vxlan_gpe_packet.h \
549 vnet/vxlan-gpe/vxlan_gpe_error.def \
550 vnet/vxlan-gpe/vxlan_gpe.api.h
551
552API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
553
554########################################
555# Tunnel protocol: ipsec+gre
556########################################
557libvnet_la_SOURCES += \
558 vnet/ipsec-gre/ipsec_gre.c \
559 vnet/ipsec-gre/node.c \
560 vnet/ipsec-gre/interface.c \
561 vnet/ipsec-gre/ipsec_gre_api.c
562
563nobase_include_HEADERS += \
564 vnet/ipsec-gre/ipsec_gre.h \
565 vnet/ipsec-gre/error.def \
566 vnet/ipsec-gre/ipsec_gre.api.h
567
568API_FILES += vnet/ipsec-gre/ipsec_gre.api
569
570########################################
571# LISP control plane: lisp-cp
572########################################
573
574libvnet_la_SOURCES += \
575 vnet/lisp-cp/lisp_types.c \
576 vnet/lisp-cp/lisp_cp_dpo.c \
577 vnet/lisp-cp/control.c \
578 vnet/lisp-cp/gid_dictionary.c \
579 vnet/lisp-cp/lisp_msg_serdes.c \
580 vnet/lisp-cp/packets.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800581 vnet/lisp-cp/lisp_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100582 vnet/lisp-cp/lisp_api.c
583
584nobase_include_HEADERS += \
585 vnet/lisp-cp/lisp_types.h \
586 vnet/lisp-cp/packets.h \
587 vnet/lisp-cp/gid_dictionary.h \
588 vnet/lisp-cp/lisp_cp_messages.h \
589 vnet/lisp-cp/lisp_msg_serdes.h \
590 vnet/lisp-cp/control.h \
591 vnet/lisp-cp/lisp.api.h
592
593API_FILES += vnet/lisp-cp/lisp.api
594
595if ENABLE_TESTS
596LDS = \
597 libvppinfra.la \
598 libvnet.la \
599 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100600 libsvm.la \
601 libsvmdb.la \
602 libvlibapi.la \
603 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100604 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100605
606TESTS += test_cp_serdes test_lisp_types
607
608test_cp_serdes_SOURCES = \
609 tests/vnet/lisp-cp/test_cp_serdes.c \
610 vnet/lisp-cp/lisp_msg_serdes.c \
611 vnet/lisp-cp/lisp_types.c \
612 vnet/lisp-cp/packets.c \
613 vnet/ip/ip_checksum.c
614
615test_lisp_types_SOURCES = \
616 tests/vnet/lisp-cp/test_lisp_types.c \
617 vnet/lisp-cp/lisp_types.c
618
619test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
620test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
621
Damjan Marionc74a86a2017-01-16 14:00:03 +0100622test_cp_serdes_LDADD = $(LDS)
623test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100624endif
625
626########################################
627# Tunnel protocol: lisp-gpe
628########################################
629
630libvnet_la_SOURCES += \
631 vnet/lisp-gpe/lisp_gpe.c \
632 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
633 vnet/lisp-gpe/lisp_gpe_adjacency.c \
634 vnet/lisp-gpe/lisp_gpe_tunnel.c \
635 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
636 vnet/lisp-gpe/lisp_gpe_tenant.c \
637 vnet/lisp-gpe/interface.c \
638 vnet/lisp-gpe/decap.c \
639 vnet/lisp-gpe/lisp_gpe_api.c
640
641nobase_include_HEADERS += \
642 vnet/lisp-gpe/lisp_gpe.h \
643 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
644 vnet/lisp-gpe/lisp_gpe_tenant.h \
645 vnet/lisp-gpe/lisp_gpe_packet.h \
646 vnet/lisp-gpe/lisp_gpe_error.def \
647 vnet/lisp-gpe/lisp_gpe.api.h
648
649API_FILES += vnet/lisp-gpe/lisp_gpe.api
650
651if ENABLE_TESTS
652TESTS += test_test
653
654test_test_SOURCES = tests/vnet/lisp-gpe/test.c
655
656test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
657
658test_test_LDADD = $(LIBOBJS)
659
660noinst_PROGRAMS += $(TESTS)
661check_PROGRAMS += $(TESTS)
662endif
663
664########################################
665# DHCP client
666########################################
667libvnet_la_SOURCES += \
668 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100669 vnet/dhcp/client.h \
670 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100671
672nobase_include_HEADERS += \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100673 vnet/dhcp/client.h \
674 vnet/dhcp/dhcp.api.h
675
676API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100677
678########################################
679# DHCP proxy
680########################################
681libvnet_la_SOURCES += \
682 vnet/dhcp/proxy_node.c \
683 vnet/dhcp/proxy.h
684
685nobase_include_HEADERS += \
686 vnet/dhcp/packet.h \
687 vnet/dhcp/proxy.h \
688 vnet/dhcp/proxy_error.def
689
690########################################
691# ipv6 segment routing
692########################################
693
Damjan Mariona9a951f2017-01-16 22:06:10 +0100694if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100695libvnet_la_SOURCES += \
696 vnet/sr/sr.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100697 vnet/sr/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100698endif
699
700nobase_include_HEADERS += \
701 vnet/sr/sr_packet.h \
702 vnet/sr/sr_error.def \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100703 vnet/sr/sr.h \
704 vnet/sr/sr.api.h
705
706API_FILES += vnet/sr/sr.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100707
708########################################
709# DHCPv6 proxy
710########################################
711libvnet_la_SOURCES += \
712 vnet/dhcpv6/proxy_node.c
713
714nobase_include_HEADERS += \
715 vnet/dhcpv6/packet.h \
716 vnet/dhcpv6/proxy.h \
717 vnet/dhcpv6/proxy_error.def
718
719########################################
720# IPFIX / netflow v10
721########################################
722libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100723 vnet/flow/flow_report.c \
724 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100725
726nobase_include_HEADERS += \
727 vnet/flow/flow_report.h \
728 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100729 vnet/flow/ipfix_packet.h \
730 vnet/flow/flow.api.h
731
732API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100733
734########################################
735# IPFIX classify code
736########################################
737
738libvnet_la_SOURCES += \
739 vnet/flow/flow_report_classify.c
740
741nobase_include_HEADERS += \
742 vnet/flow/flow_report_classify.h
743
744########################################
745# lawful intercept
746########################################
747
748libvnet_la_SOURCES += \
749 vnet/lawful-intercept/lawful_intercept.c \
750 vnet/lawful-intercept/node.c
751
752nobase_include_HEADERS += \
753 vnet/lawful-intercept/lawful_intercept.h
754
755########################################
756# SPAN (port mirroring)
757########################################
758
759libvnet_la_SOURCES += \
760 vnet/span/span_api.c \
761 vnet/span/span.c \
762 vnet/span/node.c
763
764nobase_include_HEADERS += \
765 vnet/span/span.api.h \
766 vnet/span/span.h
767
768API_FILES += vnet/span/span.api
769
770########################################
771# Packet generator
772########################################
773
774libvnet_la_SOURCES += \
775 vnet/pg/cli.c \
776 vnet/pg/edit.c \
777 vnet/pg/init.c \
778 vnet/pg/input.c \
779 vnet/pg/output.c \
780 vnet/pg/stream.c
781
782nobase_include_HEADERS += \
783 vnet/pg/pg.h \
784 vnet/pg/edit.h
785
786########################################
787# DPDK
788########################################
789if WITH_DPDK
790libvnet_la_SOURCES += \
Damjan Marion878c6092017-01-04 13:19:27 +0100791 vnet/devices/dpdk/buffer.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100792 vnet/devices/dpdk/dpdk_priv.h \
793 vnet/devices/dpdk/device.c \
794 vnet/devices/dpdk/format.c \
795 vnet/devices/dpdk/init.c \
Damjan Marionca800252017-01-16 21:29:39 +0100796 vnet/devices/dpdk/main.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100797 vnet/devices/dpdk/node.c \
Damjan Marion878c6092017-01-04 13:19:27 +0100798 vnet/devices/dpdk/thread.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100799 vnet/devices/dpdk/hqos.c \
Pavel Kotucek738f3f22017-01-09 15:11:03 +0100800 vnet/devices/dpdk/cli.c \
801 vnet/devices/dpdk/dpdk_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100802
803nobase_include_HEADERS += \
Pavel Kotucek738f3f22017-01-09 15:11:03 +0100804 vnet/devices/dpdk/dpdk.h \
805 vnet/devices/dpdk/dpdk.api.h
806
807API_FILES += vnet/devices/dpdk/dpdk.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100808else
809libvnet_la_SOURCES += \
810 vnet/devices/nic/ixge.c \
811 vnet/devices/nic/ixge.h \
812 vnet/devices/nic/sfp.c \
813 vnet/devices/nic/sfp.h
814endif
815
816########################################
817# virtio
818########################################
819
820libvnet_la_SOURCES += \
821 vnet/devices/virtio/vhost-user.c \
822 vnet/devices/virtio/vhost_user_api.c
823
824nobase_include_HEADERS += \
825 vnet/devices/virtio/vhost-user.h \
826 vnet/devices/virtio/vhost_user.api.h
827
828API_FILES += vnet/devices/virtio/vhost_user.api
829
830########################################
831# ssvm ethernet
832########################################
833libvnet_la_SOURCES += \
834 vnet/devices/ssvm/ssvm_eth.c \
835 vnet/devices/ssvm/node.c
836
837nobase_include_HEADERS += \
838 vnet/devices/ssvm/ssvm_eth.h
839
840########################################
841# Linux packet interface
842########################################
843
844libvnet_la_SOURCES += \
845 vnet/devices/af_packet/af_packet.c \
846 vnet/devices/af_packet/device.c \
847 vnet/devices/af_packet/node.c \
848 vnet/devices/af_packet/cli.c \
849 vnet/devices/af_packet/af_packet_api.c
850
851nobase_include_HEADERS += \
852 vnet/devices/af_packet/af_packet.h \
853 vnet/devices/af_packet/af_packet.api.h
854
855API_FILES += vnet/devices/af_packet/af_packet.api
856
857########################################
858# NETMAP interface
859########################################
860
861libvnet_la_SOURCES += \
862 vnet/devices/netmap/netmap.c \
863 vnet/devices/netmap/device.c \
864 vnet/devices/netmap/node.c \
865 vnet/devices/netmap/cli.c \
866 vnet/devices/netmap/netmap_api.c
867
868nobase_include_HEADERS += \
869 vnet/devices/netmap/netmap.h \
870 vnet/devices/netmap/netmap.api.h
871
872API_FILES += vnet/devices/netmap/netmap.api
873
874########################################
875# Driver feature graph arc support
876########################################
877
878libvnet_la_SOURCES += \
879 vnet/feature/feature.c \
880 vnet/feature/registration.c
881
882nobase_include_HEADERS += \
883 vnet/feature/feature.h
884
885########################################
886# Unix kernel related
887########################################
888
889# FIXME: vnet/unix/hgshm.c
890
891libvnet_la_SOURCES += \
892 vnet/unix/gdb_funcs.c \
893 vnet/unix/pcap.c \
894 vnet/unix/tap_api.c \
895 vnet/unix/tapcli.c \
896 vnet/unix/tuntap.c
897
898nobase_include_HEADERS += \
899 vnet/unix/pcap.h \
900 vnet/unix/tuntap.h \
901 vnet/unix/tap.api.h \
902 vnet/unix/tapcli.h
903
904API_FILES += vnet/unix/tap.api
905
906########################################
907# FIB
908########################################
909
910libvnet_la_SOURCES += \
911 vnet/fib/fib.c \
912 vnet/fib/fib_test.c \
913 vnet/fib/ip4_fib.c \
914 vnet/fib/ip6_fib.c \
915 vnet/fib/mpls_fib.c \
916 vnet/fib/fib_table.c \
917 vnet/fib/fib_walk.c \
918 vnet/fib/fib_types.c \
919 vnet/fib/fib_node.c \
920 vnet/fib/fib_node_list.c \
921 vnet/fib/fib_entry.c \
922 vnet/fib/fib_entry_src.c \
923 vnet/fib/fib_entry_src_rr.c \
924 vnet/fib/fib_entry_src_interface.c \
925 vnet/fib/fib_entry_src_default_route.c \
926 vnet/fib/fib_entry_src_special.c \
927 vnet/fib/fib_entry_src_api.c \
928 vnet/fib/fib_entry_src_adj.c \
929 vnet/fib/fib_entry_src_mpls.c \
930 vnet/fib/fib_entry_src_lisp.c \
931 vnet/fib/fib_entry_cover.c \
932 vnet/fib/fib_entry_delegate.c \
933 vnet/fib/fib_path_list.c \
934 vnet/fib/fib_path.c \
935 vnet/fib/fib_path_ext.c \
936 vnet/fib/fib_urpf_list.c \
937 vnet/fib/fib_attached_export.c
938
939nobase_include_HEADERS += \
940 vnet/fib/fib.h \
941 vnet/fib/fib_api.h \
942 vnet/fib/ip4_fib.h \
943 vnet/fib/ip6_fib.h \
944 vnet/fib/fib_types.h \
945 vnet/fib/fib_table.h \
946 vnet/fib/fib_node.h \
947 vnet/fib/fib_node_list.h \
948 vnet/fib/fib_entry.h \
949 vnet/fib/fib_entry_delegate.h
950
951########################################
952# ADJ
953########################################
954
955libvnet_la_SOURCES += \
956 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100957 vnet/adj/adj_glean.c \
958 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000959 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100960 vnet/adj/adj_l2.c \
961 vnet/adj/adj.c
962
963nobase_include_HEADERS += \
964 vnet/adj/adj.h \
965 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100966 vnet/adj/adj_glean.h \
967 vnet/adj/adj_nbr.h
968
969########################################
970# Data-Plane Objects
971########################################
972
973libvnet_la_SOURCES += \
974 vnet/dpo/dpo.c \
975 vnet/dpo/drop_dpo.c \
976 vnet/dpo/ip_null_dpo.c \
977 vnet/dpo/punt_dpo.c \
978 vnet/dpo/receive_dpo.c \
979 vnet/dpo/load_balance.c \
980 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000981 vnet/dpo/lookup_dpo.c \
982 vnet/dpo/classify_dpo.c \
983 vnet/dpo/replicate_dpo.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100984 vnet/dpo/mpls_label_dpo.c
985
986nobase_include_HEADERS += \
987 vnet/dpo/load_balance.h \
988 vnet/dpo/drop_dpo.h \
989 vnet/dpo/lookup_dpo.h \
990 vnet/dpo/punt_dpo.h \
991 vnet/dpo/classify_dpo.h \
992 vnet/dpo/receive_dpo.h \
993 vnet/dpo/ip_null_dpo.h \
994 vnet/dpo/dpo.h
995
996########################################
Neale Ranns32e1c012016-11-22 17:07:28 +0000997# Multicast FIB
998########################################
999
1000libvnet_la_SOURCES += \
1001 vnet/mfib/mfib_test.c \
1002 vnet/mfib/mfib_forward.c \
1003 vnet/mfib/ip4_mfib.c \
1004 vnet/mfib/ip6_mfib.c \
1005 vnet/mfib/mfib_types.c \
1006 vnet/mfib/mfib_signal.c \
1007 vnet/mfib/mfib_itf.c \
1008 vnet/mfib/mfib_entry.c \
1009 vnet/mfib/mfib_table.c
1010
1011nobase_include_HEADERS += \
1012 vnet/mfib/ip4_mfib.h \
1013 vnet/mfib/mfib_types.h \
1014 vnet/mfib/mfib_table.h
1015
1016########################################
1017# Utilities
1018########################################
1019
1020libvnet_la_SOURCES += \
1021 vnet/util/radix.c
1022
1023########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001024# Plugin client library
1025########################################
1026
Damjan Marion7cd468a2016-12-19 23:05:39 +01001027nobase_include_HEADERS += \
1028 vnet/plugin/plugin.h
1029
Damjan Marion7cd468a2016-12-19 23:05:39 +01001030pcap2pg_SOURCES = \
1031 vnet/unix/pcap2pg.c \
1032 vnet/unix/pcap.h
1033
1034pcap2pg_LDFLAGS = -static
1035pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1036
1037noinst_PROGRAMS += pcap2pg
1038
1039# vi:syntax=automake