blob: c692249327c5f4ef7cef33f8d003109d228f98a8 [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 \
65 vnet/vnet_msg_enum.h
66
67API_FILES += vnet/interface.api
68
69########################################
70# Policer infra
71########################################
72
73libvnet_la_SOURCES += \
74 vnet/policer/node_funcs.c \
75 vnet/policer/policer.c \
76 vnet/policer/xlate.c
77
78nobase_include_HEADERS += \
79 vnet/policer/police.h \
80 vnet/policer/policer.h \
81 vnet/policer/xlate.h
82
83########################################
84# Cop - junk filter
85########################################
86
87libvnet_la_SOURCES += \
88 vnet/cop/cop.c \
89 vnet/cop/node1.c \
90 vnet/cop/ip4_whitelist.c \
91 vnet/cop/ip6_whitelist.c
92
93nobase_include_HEADERS += \
94 vnet/cop/cop.h
95
96########################################
97# Layer 2 protocols go here
98########################################
99
100########################################
101# Layer 2 protocol: Ethernet
102########################################
103libvnet_la_SOURCES += \
104 vnet/ethernet/arp.c \
105 vnet/ethernet/format.c \
106 vnet/ethernet/init.c \
107 vnet/ethernet/interface.c \
108 vnet/ethernet/node.c \
109 vnet/ethernet/pg.c
110
111nobase_include_HEADERS += \
112 vnet/ethernet/arp_packet.h \
113 vnet/ethernet/error.def \
114 vnet/ethernet/ethernet.h \
115 vnet/ethernet/packet.h \
116 vnet/ethernet/types.def
117
118########################################
119# Layer 2 protocol: Ethernet bridging
120########################################
121libvnet_la_SOURCES += \
122 vnet/l2/feat_bitmap.c \
123 vnet/l2/l2_api.c \
124 vnet/l2/l2_bd.c \
125 vnet/l2/l2_bvi.c \
126 vnet/l2/l2_input_classify.c \
127 vnet/l2/l2_output_classify.c \
128 vnet/l2/l2_efp_filter.c \
129 vnet/l2/l2_fib.c \
130 vnet/l2/l2_flood.c \
131 vnet/l2/l2_fwd.c \
132 vnet/l2/l2_input_acl.c \
133 vnet/l2/l2_input.c \
134 vnet/l2/l2_input_vtr.c \
135 vnet/l2/l2_learn.c \
136 vnet/l2/l2_output_acl.c \
137 vnet/l2/l2_output.c \
138 vnet/l2/l2_patch.c \
139 vnet/l2/l2_rw.c \
140 vnet/l2/l2_vtr.c \
141 vnet/l2/l2_xcrw.c
142
143nobase_include_HEADERS += \
144 vnet/l2/feat_bitmap.h \
145 vnet/l2/l2_input.h \
146 vnet/l2/l2_output.h \
147 vnet/l2/l2_vtr.h \
148 vnet/l2/l2_input_vtr.h \
149 vnet/l2/l2_efp_filter.h \
150 vnet/l2/l2_fwd.h \
151 vnet/l2/l2_bd.h \
152 vnet/l2/l2_bvi.h \
153 vnet/l2/l2_flood.h \
154 vnet/l2/l2_fib.h \
155 vnet/l2/l2_rw.h \
156 vnet/l2/l2_xcrw.h \
157 vnet/l2/l2_classify.h \
158 vnet/l2/l2.api.h
159
160API_FILES += vnet/l2/l2.api
161
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 vnet/vxlan/vxlan_api.c
231
232nobase_include_HEADERS += \
233 vnet/vxlan/vxlan.h \
234 vnet/vxlan/vxlan_packet.h \
235 vnet/vxlan/vxlan_error.def \
236 vnet/vxlan/vxlan.api.h
237
238API_FILES += vnet/vxlan/vxlan.api
239
240########################################
241# Layer 2 / CDP
242########################################
243libvnet_la_SOURCES += \
244 vnet/cdp/cdp_input.c \
245 vnet/cdp/cdp_node.c \
246 vnet/cdp/cdp_periodic.c
247
248nobase_include_HEADERS += \
249 vnet/cdp/cdp_protocol.h
250
251########################################
252# Layer 2 / LLDP
253########################################
254libvnet_la_SOURCES += \
255 vnet/lldp/lldp_input.c \
256 vnet/lldp/lldp_node.c \
257 vnet/lldp/lldp_output.c \
258 vnet/lldp/lldp_cli.c
259
260nobase_include_HEADERS += \
261 vnet/lldp/lldp_protocol.h
262
263########################################
264# Layer 2/3 "classify"
265########################################
266libvnet_la_SOURCES += \
267 vnet/classify/vnet_classify.c \
268 vnet/classify/ip_classify.c \
269 vnet/classify/input_acl.c \
270 vnet/classify/policer_classify.c \
271 vnet/classify/flow_classify.c \
272 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100273 vnet/classify/vnet_classify.h \
274 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100275
276nobase_include_HEADERS += \
277 vnet/classify/vnet_classify.h \
278 vnet/classify/input_acl.h \
279 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100280 vnet/classify/flow_classify.h \
281 vnet/classify/classify.api.h
282
283API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100284
285########################################
286# Layer 3 protocols go here
287########################################
288
289########################################
290# Layer 3 protocol: IP v4/v6
291########################################
292libvnet_la_SOURCES += \
293 vnet/ip/format.c \
294 vnet/ip/icmp4.c \
295 vnet/ip/icmp6.c \
296 vnet/ip/ip46_cli.c \
297 vnet/ip/ip4_format.c \
298 vnet/ip/ip4_forward.c \
299 vnet/ip/ip4_input.c \
300 vnet/ip/ip4_mtrie.c \
301 vnet/ip/ip4_pg.c \
302 vnet/ip/ip4_source_and_port_range_check.c \
303 vnet/ip/ip4_source_check.c \
304 vnet/ip/ip6_format.c \
305 vnet/ip/ip6_forward.c \
306 vnet/ip/ip6_hop_by_hop.c \
307 vnet/ip/ip6_input.c \
308 vnet/ip/ip6_neighbor.c \
309 vnet/ip/ip6_pg.c \
310 vnet/ip/ip_api.c \
311 vnet/ip/ip_checksum.c \
312 vnet/ip/ip_frag.c \
313 vnet/ip/ip.h \
314 vnet/ip/ip_init.c \
315 vnet/ip/ip_input_acl.c \
316 vnet/ip/lookup.c \
317 vnet/ip/ping.c \
318 vnet/ip/punt.c \
319 vnet/ip/udp_format.c \
320 vnet/ip/udp_init.c \
321 vnet/ip/udp_local.c \
322 vnet/ip/udp_pg.c
323
324nobase_include_HEADERS += \
325 vnet/ip/format.h \
326 vnet/ip/icmp46_packet.h \
327 vnet/ip/icmp4.h \
328 vnet/ip/icmp6.h \
329 vnet/ip/igmp_packet.h \
330 vnet/ip/ip.api.h \
331 vnet/ip/ip4_error.h \
332 vnet/ip/ip4.h \
333 vnet/ip/ip4_mtrie.h \
334 vnet/ip/ip4_packet.h \
335 vnet/ip/ip6_error.h \
336 vnet/ip/ip6.h \
337 vnet/ip/ip6_hop_by_hop.h \
338 vnet/ip/ip6_hop_by_hop_packet.h \
339 vnet/ip/ip6_packet.h \
340 vnet/ip/ip6_neighbor.h \
341 vnet/ip/ip.h \
342 vnet/ip/ip_packet.h \
343 vnet/ip/ip_source_and_port_range_check.h \
344 vnet/ip/lookup.h \
345 vnet/ip/ports.def \
346 vnet/ip/protocols.def \
347 vnet/ip/punt_error.def \
348 vnet/ip/punt.h \
349 vnet/ip/tcp_packet.h \
350 vnet/ip/udp_error.def \
351 vnet/ip/udp.h \
352 vnet/ip/udp_packet.h
353
354API_FILES += vnet/ip/ip.api
355
356########################################
357# Bidirectional Forwarding Detection
358########################################
359
360nobase_include_HEADERS += \
361 vnet/bfd/bfd_protocol.h \
362 vnet/bfd/bfd_main.h \
363 vnet/bfd/bfd_api.h \
364 vnet/bfd/bfd_udp.h \
365 vnet/bfd/bfd.api.h
366
367libvnet_la_SOURCES += \
368 vnet/bfd/bfd_api.h \
369 vnet/bfd/bfd_udp.c \
370 vnet/bfd/bfd_main.c \
371 vnet/bfd/bfd_protocol.c \
372 vnet/bfd/bfd_api.c
373
374API_FILES += vnet/bfd/bfd.api
375
376########################################
377# Layer 3 protocol: IPSec
378########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100379if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100380libvnet_la_SOURCES += \
381 vnet/ipsec/ipsec.c \
382 vnet/ipsec/ipsec_cli.c \
383 vnet/ipsec/ipsec_format.c \
384 vnet/ipsec/ipsec_input.c \
385 vnet/ipsec/ipsec_if.c \
386 vnet/ipsec/ipsec_if_in.c \
387 vnet/ipsec/ipsec_if_out.c \
388 vnet/ipsec/esp_encrypt.c \
389 vnet/ipsec/esp_decrypt.c \
390 vnet/ipsec/ikev2.c \
391 vnet/ipsec/ikev2_crypto.c \
392 vnet/ipsec/ikev2_cli.c \
393 vnet/ipsec/ikev2_payload.c \
394 vnet/ipsec/ikev2_format.c \
395 vnet/ipsec/ipsec_api.c
396
397API_FILES += vnet/ipsec/ipsec.api
398
399if WITH_DPDK_CRYPTO
400libvnet_la_SOURCES += \
401 vnet/devices/dpdk/ipsec/esp_encrypt.c \
402 vnet/devices/dpdk/ipsec/esp_decrypt.c \
403 vnet/devices/dpdk/ipsec/crypto_node.c \
404 vnet/devices/dpdk/ipsec/cli.c \
405 vnet/devices/dpdk/ipsec/ipsec.c
406endif
407endif
408
409libvnet_la_SOURCES += \
410 vnet/ipsec/ipsec_output.c
411
412nobase_include_HEADERS += \
413 vnet/ipsec/ipsec.h \
414 vnet/ipsec/esp.h \
415 vnet/ipsec/ikev2.h \
416 vnet/ipsec/ikev2_priv.h \
417 vnet/ipsec/ipsec.api.h
418if WITH_DPDK_CRYPTO
419nobase_include_HEADERS += \
420 vnet/devices/dpdk/ipsec/ipsec.h \
421 vnet/devices/dpdk/ipsec/esp.h
422endif
423
424########################################
425# Layer 3 protocol: osi
426########################################
427libvnet_la_SOURCES += \
428 vnet/osi/node.c \
429 vnet/osi/osi.c \
430 vnet/osi/pg.c
431
432nobase_include_HEADERS += \
433 vnet/osi/osi.h
434
435########################################
436# Layer 3 protocol: MAP
437########################################
438libvnet_la_SOURCES += \
439 vnet/map/map.c \
440 vnet/map/map_dpo.c \
441 vnet/map/ip4_map.c \
442 vnet/map/ip6_map.c \
443 vnet/map/ip4_map_t.c \
444 vnet/map/ip6_map_t.c \
445 vnet/map/map_api.c
446
447nobase_include_HEADERS += \
448 vnet/map/map.h \
449 vnet/map/map_dpo.h \
450 vnet/map/map.api.h
451
452API_FILES += vnet/map/map.api
453
454if ENABLE_TESTS
455TESTS += test_map
456test_map_SOURCES = \
457 vnet/map/test.c
458test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
459
460test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Damjan Marion0eca04d2017-01-03 20:11:35 +0100461 -lpthread -lvlibmemory -lvlibapi \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100462 -ldl -lsvm -lrt
463
464test_map_LDFLAGS = -static
465endif
466
467
468########################################
469# Tunnel protocol: gre
470########################################
471libvnet_la_SOURCES += \
472 vnet/gre/gre.c \
473 vnet/gre/node.c \
474 vnet/gre/interface.c \
475 vnet/gre/pg.c \
476 vnet/gre/gre_api.c
477
478nobase_include_HEADERS += \
479 vnet/gre/gre.h \
480 vnet/gre/packet.h \
481 vnet/gre/error.def \
482 vnet/gre/gre.api.h
483
484API_FILES += vnet/gre/gre.api
485
486########################################
487# Tunnel protocol: l2tpv3
488########################################
489libvnet_la_SOURCES += \
490 vnet/l2tp/l2tp.c \
491 vnet/l2tp/encap.c \
492 vnet/l2tp/decap.c \
493 vnet/l2tp/pg.c \
494 vnet/l2tp/l2tp_api.c
495
496nobase_include_HEADERS += \
497 vnet/l2tp/l2tp.h \
498 vnet/l2tp/packet.h \
499 vnet/l2tp/l2tp.api.h
500
501API_FILES += vnet/l2tp/l2tp.api
502
503########################################
504# Tunnel protocol: gre+mpls
505########################################
506libvnet_la_SOURCES += \
507 vnet/mpls/mpls.c \
508 vnet/mpls/mpls_lookup.c \
509 vnet/mpls/mpls_output.c \
510 vnet/mpls/mpls_features.c \
511 vnet/mpls/node.c \
512 vnet/mpls/interface.c \
513 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100514 vnet/mpls/pg.c \
515 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100516
517nobase_include_HEADERS += \
518 vnet/mpls/mpls.h \
519 vnet/mpls/mpls_types.h \
520 vnet/mpls/mpls_tunnel.h \
521 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100522 vnet/mpls/error.def \
523 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100524
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100525API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100526
527########################################
528# Tunnel protocol: vxlan-gpe
529########################################
530
531libvnet_la_SOURCES += \
532 vnet/vxlan-gpe/vxlan_gpe.c \
533 vnet/vxlan-gpe/encap.c \
534 vnet/vxlan-gpe/decap.c \
535 vnet/vxlan-gpe/vxlan_gpe_api.c
536
537nobase_include_HEADERS += \
538 vnet/vxlan-gpe/vxlan_gpe.h \
539 vnet/vxlan-gpe/vxlan_gpe_packet.h \
540 vnet/vxlan-gpe/vxlan_gpe_error.def \
541 vnet/vxlan-gpe/vxlan_gpe.api.h
542
543API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
544
545########################################
546# Tunnel protocol: ipsec+gre
547########################################
548libvnet_la_SOURCES += \
549 vnet/ipsec-gre/ipsec_gre.c \
550 vnet/ipsec-gre/node.c \
551 vnet/ipsec-gre/interface.c \
552 vnet/ipsec-gre/ipsec_gre_api.c
553
554nobase_include_HEADERS += \
555 vnet/ipsec-gre/ipsec_gre.h \
556 vnet/ipsec-gre/error.def \
557 vnet/ipsec-gre/ipsec_gre.api.h
558
559API_FILES += vnet/ipsec-gre/ipsec_gre.api
560
561########################################
562# LISP control plane: lisp-cp
563########################################
564
565libvnet_la_SOURCES += \
566 vnet/lisp-cp/lisp_types.c \
567 vnet/lisp-cp/lisp_cp_dpo.c \
568 vnet/lisp-cp/control.c \
569 vnet/lisp-cp/gid_dictionary.c \
570 vnet/lisp-cp/lisp_msg_serdes.c \
571 vnet/lisp-cp/packets.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800572 vnet/lisp-cp/lisp_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100573 vnet/lisp-cp/lisp_api.c
574
575nobase_include_HEADERS += \
576 vnet/lisp-cp/lisp_types.h \
577 vnet/lisp-cp/packets.h \
578 vnet/lisp-cp/gid_dictionary.h \
579 vnet/lisp-cp/lisp_cp_messages.h \
580 vnet/lisp-cp/lisp_msg_serdes.h \
581 vnet/lisp-cp/control.h \
582 vnet/lisp-cp/lisp.api.h
583
584API_FILES += vnet/lisp-cp/lisp.api
585
586if ENABLE_TESTS
587LDS = \
588 libvppinfra.la \
589 libvnet.la \
590 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100591 libsvm.la \
592 libsvmdb.la \
593 libvlibapi.la \
594 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100595 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100596
597TESTS += test_cp_serdes test_lisp_types
598
599test_cp_serdes_SOURCES = \
600 tests/vnet/lisp-cp/test_cp_serdes.c \
601 vnet/lisp-cp/lisp_msg_serdes.c \
602 vnet/lisp-cp/lisp_types.c \
603 vnet/lisp-cp/packets.c \
604 vnet/ip/ip_checksum.c
605
606test_lisp_types_SOURCES = \
607 tests/vnet/lisp-cp/test_lisp_types.c \
608 vnet/lisp-cp/lisp_types.c
609
610test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
611test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
612
Damjan Marionc74a86a2017-01-16 14:00:03 +0100613test_cp_serdes_LDADD = $(LDS)
614test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100615endif
616
617########################################
618# Tunnel protocol: lisp-gpe
619########################################
620
621libvnet_la_SOURCES += \
622 vnet/lisp-gpe/lisp_gpe.c \
623 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
624 vnet/lisp-gpe/lisp_gpe_adjacency.c \
625 vnet/lisp-gpe/lisp_gpe_tunnel.c \
626 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
627 vnet/lisp-gpe/lisp_gpe_tenant.c \
628 vnet/lisp-gpe/interface.c \
629 vnet/lisp-gpe/decap.c \
630 vnet/lisp-gpe/lisp_gpe_api.c
631
632nobase_include_HEADERS += \
633 vnet/lisp-gpe/lisp_gpe.h \
634 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
635 vnet/lisp-gpe/lisp_gpe_tenant.h \
636 vnet/lisp-gpe/lisp_gpe_packet.h \
637 vnet/lisp-gpe/lisp_gpe_error.def \
638 vnet/lisp-gpe/lisp_gpe.api.h
639
640API_FILES += vnet/lisp-gpe/lisp_gpe.api
641
642if ENABLE_TESTS
643TESTS += test_test
644
645test_test_SOURCES = tests/vnet/lisp-gpe/test.c
646
647test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
648
649test_test_LDADD = $(LIBOBJS)
650
651noinst_PROGRAMS += $(TESTS)
652check_PROGRAMS += $(TESTS)
653endif
654
655########################################
656# DHCP client
657########################################
658libvnet_la_SOURCES += \
659 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100660 vnet/dhcp/client.h \
661 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100662
663nobase_include_HEADERS += \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100664 vnet/dhcp/client.h \
665 vnet/dhcp/dhcp.api.h
666
667API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100668
669########################################
670# DHCP proxy
671########################################
672libvnet_la_SOURCES += \
673 vnet/dhcp/proxy_node.c \
674 vnet/dhcp/proxy.h
675
676nobase_include_HEADERS += \
677 vnet/dhcp/packet.h \
678 vnet/dhcp/proxy.h \
679 vnet/dhcp/proxy_error.def
680
681########################################
682# ipv6 segment routing
683########################################
684
Damjan Mariona9a951f2017-01-16 22:06:10 +0100685if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100686libvnet_la_SOURCES += \
687 vnet/sr/sr.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100688 vnet/sr/sr_replicate.c \
689 vnet/sr/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100690endif
691
692nobase_include_HEADERS += \
693 vnet/sr/sr_packet.h \
694 vnet/sr/sr_error.def \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100695 vnet/sr/sr.h \
696 vnet/sr/sr.api.h
697
698API_FILES += vnet/sr/sr.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100699
700########################################
701# DHCPv6 proxy
702########################################
703libvnet_la_SOURCES += \
704 vnet/dhcpv6/proxy_node.c
705
706nobase_include_HEADERS += \
707 vnet/dhcpv6/packet.h \
708 vnet/dhcpv6/proxy.h \
709 vnet/dhcpv6/proxy_error.def
710
711########################################
712# IPFIX / netflow v10
713########################################
714libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100715 vnet/flow/flow_report.c \
716 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100717
718nobase_include_HEADERS += \
719 vnet/flow/flow_report.h \
720 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100721 vnet/flow/ipfix_packet.h \
722 vnet/flow/flow.api.h
723
724API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100725
726########################################
727# IPFIX classify code
728########################################
729
730libvnet_la_SOURCES += \
731 vnet/flow/flow_report_classify.c
732
733nobase_include_HEADERS += \
734 vnet/flow/flow_report_classify.h
735
736########################################
737# lawful intercept
738########################################
739
740libvnet_la_SOURCES += \
741 vnet/lawful-intercept/lawful_intercept.c \
742 vnet/lawful-intercept/node.c
743
744nobase_include_HEADERS += \
745 vnet/lawful-intercept/lawful_intercept.h
746
747########################################
748# SPAN (port mirroring)
749########################################
750
751libvnet_la_SOURCES += \
752 vnet/span/span_api.c \
753 vnet/span/span.c \
754 vnet/span/node.c
755
756nobase_include_HEADERS += \
757 vnet/span/span.api.h \
758 vnet/span/span.h
759
760API_FILES += vnet/span/span.api
761
762########################################
763# Packet generator
764########################################
765
766libvnet_la_SOURCES += \
767 vnet/pg/cli.c \
768 vnet/pg/edit.c \
769 vnet/pg/init.c \
770 vnet/pg/input.c \
771 vnet/pg/output.c \
772 vnet/pg/stream.c
773
774nobase_include_HEADERS += \
775 vnet/pg/pg.h \
776 vnet/pg/edit.h
777
778########################################
779# DPDK
780########################################
781if WITH_DPDK
782libvnet_la_SOURCES += \
Damjan Marion878c6092017-01-04 13:19:27 +0100783 vnet/devices/dpdk/buffer.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100784 vnet/devices/dpdk/dpdk_priv.h \
785 vnet/devices/dpdk/device.c \
786 vnet/devices/dpdk/format.c \
787 vnet/devices/dpdk/init.c \
Damjan Marionca800252017-01-16 21:29:39 +0100788 vnet/devices/dpdk/main.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100789 vnet/devices/dpdk/node.c \
Damjan Marion878c6092017-01-04 13:19:27 +0100790 vnet/devices/dpdk/thread.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100791 vnet/devices/dpdk/hqos.c \
Pavel Kotucek738f3f22017-01-09 15:11:03 +0100792 vnet/devices/dpdk/cli.c \
793 vnet/devices/dpdk/dpdk_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100794
795nobase_include_HEADERS += \
Pavel Kotucek738f3f22017-01-09 15:11:03 +0100796 vnet/devices/dpdk/dpdk.h \
797 vnet/devices/dpdk/dpdk.api.h
798
799API_FILES += vnet/devices/dpdk/dpdk.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100800else
801libvnet_la_SOURCES += \
802 vnet/devices/nic/ixge.c \
803 vnet/devices/nic/ixge.h \
804 vnet/devices/nic/sfp.c \
805 vnet/devices/nic/sfp.h
806endif
807
808########################################
809# virtio
810########################################
811
812libvnet_la_SOURCES += \
813 vnet/devices/virtio/vhost-user.c \
814 vnet/devices/virtio/vhost_user_api.c
815
816nobase_include_HEADERS += \
817 vnet/devices/virtio/vhost-user.h \
818 vnet/devices/virtio/vhost_user.api.h
819
820API_FILES += vnet/devices/virtio/vhost_user.api
821
822########################################
823# ssvm ethernet
824########################################
825libvnet_la_SOURCES += \
826 vnet/devices/ssvm/ssvm_eth.c \
827 vnet/devices/ssvm/node.c
828
829nobase_include_HEADERS += \
830 vnet/devices/ssvm/ssvm_eth.h
831
832########################################
833# Linux packet interface
834########################################
835
836libvnet_la_SOURCES += \
837 vnet/devices/af_packet/af_packet.c \
838 vnet/devices/af_packet/device.c \
839 vnet/devices/af_packet/node.c \
840 vnet/devices/af_packet/cli.c \
841 vnet/devices/af_packet/af_packet_api.c
842
843nobase_include_HEADERS += \
844 vnet/devices/af_packet/af_packet.h \
845 vnet/devices/af_packet/af_packet.api.h
846
847API_FILES += vnet/devices/af_packet/af_packet.api
848
849########################################
850# NETMAP interface
851########################################
852
853libvnet_la_SOURCES += \
854 vnet/devices/netmap/netmap.c \
855 vnet/devices/netmap/device.c \
856 vnet/devices/netmap/node.c \
857 vnet/devices/netmap/cli.c \
858 vnet/devices/netmap/netmap_api.c
859
860nobase_include_HEADERS += \
861 vnet/devices/netmap/netmap.h \
862 vnet/devices/netmap/netmap.api.h
863
864API_FILES += vnet/devices/netmap/netmap.api
865
866########################################
867# Driver feature graph arc support
868########################################
869
870libvnet_la_SOURCES += \
871 vnet/feature/feature.c \
872 vnet/feature/registration.c
873
874nobase_include_HEADERS += \
875 vnet/feature/feature.h
876
877########################################
878# Unix kernel related
879########################################
880
881# FIXME: vnet/unix/hgshm.c
882
883libvnet_la_SOURCES += \
884 vnet/unix/gdb_funcs.c \
885 vnet/unix/pcap.c \
886 vnet/unix/tap_api.c \
887 vnet/unix/tapcli.c \
888 vnet/unix/tuntap.c
889
890nobase_include_HEADERS += \
891 vnet/unix/pcap.h \
892 vnet/unix/tuntap.h \
893 vnet/unix/tap.api.h \
894 vnet/unix/tapcli.h
895
896API_FILES += vnet/unix/tap.api
897
898########################################
899# FIB
900########################################
901
902libvnet_la_SOURCES += \
903 vnet/fib/fib.c \
904 vnet/fib/fib_test.c \
905 vnet/fib/ip4_fib.c \
906 vnet/fib/ip6_fib.c \
907 vnet/fib/mpls_fib.c \
908 vnet/fib/fib_table.c \
909 vnet/fib/fib_walk.c \
910 vnet/fib/fib_types.c \
911 vnet/fib/fib_node.c \
912 vnet/fib/fib_node_list.c \
913 vnet/fib/fib_entry.c \
914 vnet/fib/fib_entry_src.c \
915 vnet/fib/fib_entry_src_rr.c \
916 vnet/fib/fib_entry_src_interface.c \
917 vnet/fib/fib_entry_src_default_route.c \
918 vnet/fib/fib_entry_src_special.c \
919 vnet/fib/fib_entry_src_api.c \
920 vnet/fib/fib_entry_src_adj.c \
921 vnet/fib/fib_entry_src_mpls.c \
922 vnet/fib/fib_entry_src_lisp.c \
923 vnet/fib/fib_entry_cover.c \
924 vnet/fib/fib_entry_delegate.c \
925 vnet/fib/fib_path_list.c \
926 vnet/fib/fib_path.c \
927 vnet/fib/fib_path_ext.c \
928 vnet/fib/fib_urpf_list.c \
929 vnet/fib/fib_attached_export.c
930
931nobase_include_HEADERS += \
932 vnet/fib/fib.h \
933 vnet/fib/fib_api.h \
934 vnet/fib/ip4_fib.h \
935 vnet/fib/ip6_fib.h \
936 vnet/fib/fib_types.h \
937 vnet/fib/fib_table.h \
938 vnet/fib/fib_node.h \
939 vnet/fib/fib_node_list.h \
940 vnet/fib/fib_entry.h \
941 vnet/fib/fib_entry_delegate.h
942
943########################################
944# ADJ
945########################################
946
947libvnet_la_SOURCES += \
948 vnet/adj/adj_nbr.c \
949 vnet/adj/adj_rewrite.c \
950 vnet/adj/adj_glean.c \
951 vnet/adj/adj_midchain.c \
952 vnet/adj/adj_l2.c \
953 vnet/adj/adj.c
954
955nobase_include_HEADERS += \
956 vnet/adj/adj.h \
957 vnet/adj/adj_types.h \
958 vnet/adj/adj_rewrite.h \
959 vnet/adj/adj_glean.h \
960 vnet/adj/adj_nbr.h
961
962########################################
963# Data-Plane Objects
964########################################
965
966libvnet_la_SOURCES += \
967 vnet/dpo/dpo.c \
968 vnet/dpo/drop_dpo.c \
969 vnet/dpo/ip_null_dpo.c \
970 vnet/dpo/punt_dpo.c \
971 vnet/dpo/receive_dpo.c \
972 vnet/dpo/load_balance.c \
973 vnet/dpo/load_balance_map.c \
974 vnet/dpo/lookup_dpo.c \
975 vnet/dpo/classify_dpo.c \
976 vnet/dpo/mpls_label_dpo.c
977
978nobase_include_HEADERS += \
979 vnet/dpo/load_balance.h \
980 vnet/dpo/drop_dpo.h \
981 vnet/dpo/lookup_dpo.h \
982 vnet/dpo/punt_dpo.h \
983 vnet/dpo/classify_dpo.h \
984 vnet/dpo/receive_dpo.h \
985 vnet/dpo/ip_null_dpo.h \
986 vnet/dpo/dpo.h
987
988########################################
989# Plugin client library
990########################################
991
Damjan Marion7cd468a2016-12-19 23:05:39 +0100992nobase_include_HEADERS += \
993 vnet/plugin/plugin.h
994
Damjan Marion7cd468a2016-12-19 23:05:39 +0100995pcap2pg_SOURCES = \
996 vnet/unix/pcap2pg.c \
997 vnet/unix/pcap.h
998
999pcap2pg_LDFLAGS = -static
1000pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1001
1002noinst_PROGRAMS += pcap2pg
1003
1004# vi:syntax=automake