blob: 70f1e7e95bd0cbe4b2d876904226f46a52dbd512 [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 \
Filip Tehlar694396d2017-02-17 14:29:11 +0100581 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800582 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100583 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100584 vnet/lisp-cp/lisp_api.c
585
586nobase_include_HEADERS += \
587 vnet/lisp-cp/lisp_types.h \
588 vnet/lisp-cp/packets.h \
589 vnet/lisp-cp/gid_dictionary.h \
590 vnet/lisp-cp/lisp_cp_messages.h \
591 vnet/lisp-cp/lisp_msg_serdes.h \
592 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100593 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100594 vnet/lisp-cp/lisp.api.h
595
596API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100597API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100598
599if ENABLE_TESTS
600LDS = \
601 libvppinfra.la \
602 libvnet.la \
603 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100604 libsvm.la \
605 libsvmdb.la \
606 libvlibapi.la \
607 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100608 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100609
610TESTS += test_cp_serdes test_lisp_types
611
612test_cp_serdes_SOURCES = \
613 tests/vnet/lisp-cp/test_cp_serdes.c \
614 vnet/lisp-cp/lisp_msg_serdes.c \
615 vnet/lisp-cp/lisp_types.c \
616 vnet/lisp-cp/packets.c \
617 vnet/ip/ip_checksum.c
618
619test_lisp_types_SOURCES = \
620 tests/vnet/lisp-cp/test_lisp_types.c \
621 vnet/lisp-cp/lisp_types.c
622
623test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
624test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
625
Damjan Marionc74a86a2017-01-16 14:00:03 +0100626test_cp_serdes_LDADD = $(LDS)
627test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100628endif
629
630########################################
631# Tunnel protocol: lisp-gpe
632########################################
633
634libvnet_la_SOURCES += \
635 vnet/lisp-gpe/lisp_gpe.c \
636 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
637 vnet/lisp-gpe/lisp_gpe_adjacency.c \
638 vnet/lisp-gpe/lisp_gpe_tunnel.c \
639 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
640 vnet/lisp-gpe/lisp_gpe_tenant.c \
641 vnet/lisp-gpe/interface.c \
642 vnet/lisp-gpe/decap.c \
643 vnet/lisp-gpe/lisp_gpe_api.c
644
645nobase_include_HEADERS += \
646 vnet/lisp-gpe/lisp_gpe.h \
647 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
648 vnet/lisp-gpe/lisp_gpe_tenant.h \
649 vnet/lisp-gpe/lisp_gpe_packet.h \
650 vnet/lisp-gpe/lisp_gpe_error.def \
651 vnet/lisp-gpe/lisp_gpe.api.h
652
653API_FILES += vnet/lisp-gpe/lisp_gpe.api
654
655if ENABLE_TESTS
656TESTS += test_test
657
658test_test_SOURCES = tests/vnet/lisp-gpe/test.c
659
660test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
661
662test_test_LDADD = $(LIBOBJS)
663
664noinst_PROGRAMS += $(TESTS)
665check_PROGRAMS += $(TESTS)
666endif
667
668########################################
669# DHCP client
670########################################
671libvnet_la_SOURCES += \
672 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100673 vnet/dhcp/client.h \
674 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100675
676nobase_include_HEADERS += \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100677 vnet/dhcp/client.h \
678 vnet/dhcp/dhcp.api.h
679
680API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100681
682########################################
683# DHCP proxy
684########################################
685libvnet_la_SOURCES += \
686 vnet/dhcp/proxy_node.c \
687 vnet/dhcp/proxy.h
688
689nobase_include_HEADERS += \
690 vnet/dhcp/packet.h \
691 vnet/dhcp/proxy.h \
692 vnet/dhcp/proxy_error.def
693
694########################################
695# ipv6 segment routing
696########################################
697
Damjan Mariona9a951f2017-01-16 22:06:10 +0100698if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100699libvnet_la_SOURCES += \
700 vnet/sr/sr.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100701 vnet/sr/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100702endif
703
704nobase_include_HEADERS += \
705 vnet/sr/sr_packet.h \
706 vnet/sr/sr_error.def \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100707 vnet/sr/sr.h \
708 vnet/sr/sr.api.h
709
710API_FILES += vnet/sr/sr.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100711
712########################################
713# DHCPv6 proxy
714########################################
715libvnet_la_SOURCES += \
716 vnet/dhcpv6/proxy_node.c
717
718nobase_include_HEADERS += \
719 vnet/dhcpv6/packet.h \
720 vnet/dhcpv6/proxy.h \
721 vnet/dhcpv6/proxy_error.def
722
723########################################
724# IPFIX / netflow v10
725########################################
726libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100727 vnet/flow/flow_report.c \
728 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100729
730nobase_include_HEADERS += \
731 vnet/flow/flow_report.h \
732 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100733 vnet/flow/ipfix_packet.h \
734 vnet/flow/flow.api.h
735
736API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100737
738########################################
739# IPFIX classify code
740########################################
741
742libvnet_la_SOURCES += \
743 vnet/flow/flow_report_classify.c
744
745nobase_include_HEADERS += \
746 vnet/flow/flow_report_classify.h
747
748########################################
749# lawful intercept
750########################################
751
752libvnet_la_SOURCES += \
753 vnet/lawful-intercept/lawful_intercept.c \
754 vnet/lawful-intercept/node.c
755
756nobase_include_HEADERS += \
757 vnet/lawful-intercept/lawful_intercept.h
758
759########################################
760# SPAN (port mirroring)
761########################################
762
763libvnet_la_SOURCES += \
764 vnet/span/span_api.c \
765 vnet/span/span.c \
766 vnet/span/node.c
767
768nobase_include_HEADERS += \
769 vnet/span/span.api.h \
770 vnet/span/span.h
771
772API_FILES += vnet/span/span.api
773
774########################################
775# Packet generator
776########################################
777
778libvnet_la_SOURCES += \
779 vnet/pg/cli.c \
780 vnet/pg/edit.c \
781 vnet/pg/init.c \
782 vnet/pg/input.c \
783 vnet/pg/output.c \
784 vnet/pg/stream.c
785
786nobase_include_HEADERS += \
787 vnet/pg/pg.h \
788 vnet/pg/edit.h
789
790########################################
791# DPDK
792########################################
793if WITH_DPDK
794libvnet_la_SOURCES += \
Damjan Marion878c6092017-01-04 13:19:27 +0100795 vnet/devices/dpdk/buffer.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100796 vnet/devices/dpdk/dpdk_priv.h \
797 vnet/devices/dpdk/device.c \
798 vnet/devices/dpdk/format.c \
799 vnet/devices/dpdk/init.c \
Damjan Marionca800252017-01-16 21:29:39 +0100800 vnet/devices/dpdk/main.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100801 vnet/devices/dpdk/node.c \
Damjan Marion878c6092017-01-04 13:19:27 +0100802 vnet/devices/dpdk/thread.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100803 vnet/devices/dpdk/hqos.c \
Pavel Kotucek738f3f22017-01-09 15:11:03 +0100804 vnet/devices/dpdk/cli.c \
805 vnet/devices/dpdk/dpdk_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100806
807nobase_include_HEADERS += \
Pavel Kotucek738f3f22017-01-09 15:11:03 +0100808 vnet/devices/dpdk/dpdk.h \
809 vnet/devices/dpdk/dpdk.api.h
810
811API_FILES += vnet/devices/dpdk/dpdk.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100812else
813libvnet_la_SOURCES += \
814 vnet/devices/nic/ixge.c \
815 vnet/devices/nic/ixge.h \
816 vnet/devices/nic/sfp.c \
817 vnet/devices/nic/sfp.h
818endif
819
820########################################
821# virtio
822########################################
823
824libvnet_la_SOURCES += \
825 vnet/devices/virtio/vhost-user.c \
826 vnet/devices/virtio/vhost_user_api.c
827
828nobase_include_HEADERS += \
829 vnet/devices/virtio/vhost-user.h \
830 vnet/devices/virtio/vhost_user.api.h
831
832API_FILES += vnet/devices/virtio/vhost_user.api
833
834########################################
835# ssvm ethernet
836########################################
837libvnet_la_SOURCES += \
838 vnet/devices/ssvm/ssvm_eth.c \
839 vnet/devices/ssvm/node.c
840
841nobase_include_HEADERS += \
842 vnet/devices/ssvm/ssvm_eth.h
843
844########################################
845# Linux packet interface
846########################################
847
848libvnet_la_SOURCES += \
849 vnet/devices/af_packet/af_packet.c \
850 vnet/devices/af_packet/device.c \
851 vnet/devices/af_packet/node.c \
852 vnet/devices/af_packet/cli.c \
853 vnet/devices/af_packet/af_packet_api.c
854
855nobase_include_HEADERS += \
856 vnet/devices/af_packet/af_packet.h \
857 vnet/devices/af_packet/af_packet.api.h
858
859API_FILES += vnet/devices/af_packet/af_packet.api
860
861########################################
862# NETMAP interface
863########################################
864
865libvnet_la_SOURCES += \
866 vnet/devices/netmap/netmap.c \
867 vnet/devices/netmap/device.c \
868 vnet/devices/netmap/node.c \
869 vnet/devices/netmap/cli.c \
870 vnet/devices/netmap/netmap_api.c
871
872nobase_include_HEADERS += \
873 vnet/devices/netmap/netmap.h \
874 vnet/devices/netmap/netmap.api.h
875
876API_FILES += vnet/devices/netmap/netmap.api
877
878########################################
879# Driver feature graph arc support
880########################################
881
882libvnet_la_SOURCES += \
883 vnet/feature/feature.c \
884 vnet/feature/registration.c
885
886nobase_include_HEADERS += \
887 vnet/feature/feature.h
888
889########################################
890# Unix kernel related
891########################################
892
893# FIXME: vnet/unix/hgshm.c
894
895libvnet_la_SOURCES += \
896 vnet/unix/gdb_funcs.c \
897 vnet/unix/pcap.c \
898 vnet/unix/tap_api.c \
899 vnet/unix/tapcli.c \
900 vnet/unix/tuntap.c
901
902nobase_include_HEADERS += \
903 vnet/unix/pcap.h \
904 vnet/unix/tuntap.h \
905 vnet/unix/tap.api.h \
906 vnet/unix/tapcli.h
907
908API_FILES += vnet/unix/tap.api
909
910########################################
911# FIB
912########################################
913
914libvnet_la_SOURCES += \
915 vnet/fib/fib.c \
916 vnet/fib/fib_test.c \
917 vnet/fib/ip4_fib.c \
918 vnet/fib/ip6_fib.c \
919 vnet/fib/mpls_fib.c \
920 vnet/fib/fib_table.c \
921 vnet/fib/fib_walk.c \
922 vnet/fib/fib_types.c \
923 vnet/fib/fib_node.c \
924 vnet/fib/fib_node_list.c \
925 vnet/fib/fib_entry.c \
926 vnet/fib/fib_entry_src.c \
927 vnet/fib/fib_entry_src_rr.c \
928 vnet/fib/fib_entry_src_interface.c \
929 vnet/fib/fib_entry_src_default_route.c \
930 vnet/fib/fib_entry_src_special.c \
931 vnet/fib/fib_entry_src_api.c \
932 vnet/fib/fib_entry_src_adj.c \
933 vnet/fib/fib_entry_src_mpls.c \
934 vnet/fib/fib_entry_src_lisp.c \
935 vnet/fib/fib_entry_cover.c \
936 vnet/fib/fib_entry_delegate.c \
937 vnet/fib/fib_path_list.c \
938 vnet/fib/fib_path.c \
939 vnet/fib/fib_path_ext.c \
940 vnet/fib/fib_urpf_list.c \
941 vnet/fib/fib_attached_export.c
942
943nobase_include_HEADERS += \
944 vnet/fib/fib.h \
945 vnet/fib/fib_api.h \
946 vnet/fib/ip4_fib.h \
947 vnet/fib/ip6_fib.h \
948 vnet/fib/fib_types.h \
949 vnet/fib/fib_table.h \
950 vnet/fib/fib_node.h \
951 vnet/fib/fib_node_list.h \
952 vnet/fib/fib_entry.h \
953 vnet/fib/fib_entry_delegate.h
954
955########################################
956# ADJ
957########################################
958
959libvnet_la_SOURCES += \
960 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100961 vnet/adj/adj_glean.c \
962 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000963 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100964 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800965 vnet/adj/adj_nsh.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100966 vnet/adj/adj.c
967
968nobase_include_HEADERS += \
969 vnet/adj/adj.h \
970 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100971 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800972 vnet/adj/adj_nsh.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100973 vnet/adj/adj_nbr.h
974
975########################################
976# Data-Plane Objects
977########################################
978
979libvnet_la_SOURCES += \
980 vnet/dpo/dpo.c \
981 vnet/dpo/drop_dpo.c \
982 vnet/dpo/ip_null_dpo.c \
983 vnet/dpo/punt_dpo.c \
984 vnet/dpo/receive_dpo.c \
985 vnet/dpo/load_balance.c \
986 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000987 vnet/dpo/lookup_dpo.c \
988 vnet/dpo/classify_dpo.c \
989 vnet/dpo/replicate_dpo.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100990 vnet/dpo/mpls_label_dpo.c
991
992nobase_include_HEADERS += \
993 vnet/dpo/load_balance.h \
994 vnet/dpo/drop_dpo.h \
995 vnet/dpo/lookup_dpo.h \
996 vnet/dpo/punt_dpo.h \
997 vnet/dpo/classify_dpo.h \
998 vnet/dpo/receive_dpo.h \
999 vnet/dpo/ip_null_dpo.h \
1000 vnet/dpo/dpo.h
1001
1002########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001003# Multicast FIB
1004########################################
1005
1006libvnet_la_SOURCES += \
1007 vnet/mfib/mfib_test.c \
1008 vnet/mfib/mfib_forward.c \
1009 vnet/mfib/ip4_mfib.c \
1010 vnet/mfib/ip6_mfib.c \
1011 vnet/mfib/mfib_types.c \
1012 vnet/mfib/mfib_signal.c \
1013 vnet/mfib/mfib_itf.c \
1014 vnet/mfib/mfib_entry.c \
1015 vnet/mfib/mfib_table.c
1016
1017nobase_include_HEADERS += \
1018 vnet/mfib/ip4_mfib.h \
1019 vnet/mfib/mfib_types.h \
1020 vnet/mfib/mfib_table.h
1021
1022########################################
1023# Utilities
1024########################################
1025
1026libvnet_la_SOURCES += \
1027 vnet/util/radix.c
1028
1029########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001030# Plugin client library
1031########################################
1032
Damjan Marion7cd468a2016-12-19 23:05:39 +01001033nobase_include_HEADERS += \
1034 vnet/plugin/plugin.h
1035
Damjan Marion7cd468a2016-12-19 23:05:39 +01001036pcap2pg_SOURCES = \
1037 vnet/unix/pcap2pg.c \
1038 vnet/unix/pcap.h
1039
1040pcap2pg_LDFLAGS = -static
1041pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1042
1043noinst_PROGRAMS += pcap2pg
1044
1045# vi:syntax=automake