blob: 223d5d93ddaabf5ad713af47d5949e102f325e4f [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 Marionc3a814b2017-02-28 19:22:22 +010026libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt
Damjan Marion45a00c42017-01-08 15:34:50 +010027
Damjan Mariona9a951f2017-01-16 22:06:10 +010028if WITH_LIBSSL
Damjan Marion45a00c42017-01-08 15:34:50 +010029libvnet_la_LIBADD += -lcrypto
30endif
Damjan Marion7cd468a2016-12-19 23:05:39 +010031
32########################################
33# Generic stuff
34########################################
35libvnet_la_SOURCES += \
36 vnet/config.c \
37 vnet/devices/devices.c \
38 vnet/handoff.c \
39 vnet/interface.c \
40 vnet/interface_api.c \
41 vnet/interface_cli.c \
42 vnet/interface_format.c \
43 vnet/interface_output.c \
44 vnet/misc.c \
45 vnet/replication.c \
46 vnet/rewrite.c
47
48nobase_include_HEADERS += \
49 vnet/api_errno.h \
50 vnet/buffer.h \
51 vnet/config.h \
52 vnet/devices/devices.h \
53 vnet/global_funcs.h \
54 vnet/handoff.h \
55 vnet/interface.h \
56 vnet/interface.api.h \
57 vnet/interface_funcs.h \
58 vnet/l3_types.h \
59 vnet/pipeline.h \
60 vnet/replication.h \
61 vnet/rewrite.h \
62 vnet/vnet.h \
63 vnet/vnet_all_api_h.h \
Gabriel Ganne5842c782017-01-30 13:44:04 +010064 vnet/vnet_msg_enum.h \
65 vnet/util/radix.h
Damjan Marion7cd468a2016-12-19 23:05:39 +010066
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 \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010076 vnet/policer/xlate.c \
77 vnet/policer/policer_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010078
79nobase_include_HEADERS += \
80 vnet/policer/police.h \
81 vnet/policer/policer.h \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010082 vnet/policer/xlate.h \
83 vnet/policer/policer.api.h
84
85API_FILES += vnet/policer/policer.api
Damjan Marion7cd468a2016-12-19 23:05:39 +010086
87########################################
88# Cop - junk filter
89########################################
90
91libvnet_la_SOURCES += \
92 vnet/cop/cop.c \
93 vnet/cop/node1.c \
94 vnet/cop/ip4_whitelist.c \
Pavel Kotucek884cf262017-01-25 08:27:15 +010095 vnet/cop/ip6_whitelist.c \
96 vnet/cop/cop_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010097
98nobase_include_HEADERS += \
Pavel Kotucek884cf262017-01-25 08:27:15 +010099 vnet/cop/cop.h \
100 vnet/cop/cop.api.h
101
102API_FILES += vnet/cop/cop.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100103
104########################################
105# Layer 2 protocols go here
106########################################
107
108########################################
109# Layer 2 protocol: Ethernet
110########################################
111libvnet_la_SOURCES += \
112 vnet/ethernet/arp.c \
113 vnet/ethernet/format.c \
114 vnet/ethernet/init.c \
115 vnet/ethernet/interface.c \
116 vnet/ethernet/node.c \
Damjan Marion374e2c52017-03-09 20:38:15 +0100117 vnet/ethernet/pg.c \
118 vnet/ethernet/sfp.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100119
120nobase_include_HEADERS += \
121 vnet/ethernet/arp_packet.h \
122 vnet/ethernet/error.def \
123 vnet/ethernet/ethernet.h \
124 vnet/ethernet/packet.h \
Damjan Marion374e2c52017-03-09 20:38:15 +0100125 vnet/ethernet/types.def \
126 vnet/ethernet/sfp.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100127
128########################################
129# Layer 2 protocol: Ethernet bridging
130########################################
131libvnet_la_SOURCES += \
132 vnet/l2/feat_bitmap.c \
133 vnet/l2/l2_api.c \
134 vnet/l2/l2_bd.c \
135 vnet/l2/l2_bvi.c \
136 vnet/l2/l2_input_classify.c \
137 vnet/l2/l2_output_classify.c \
138 vnet/l2/l2_efp_filter.c \
139 vnet/l2/l2_fib.c \
140 vnet/l2/l2_flood.c \
141 vnet/l2/l2_fwd.c \
142 vnet/l2/l2_input_acl.c \
143 vnet/l2/l2_input.c \
144 vnet/l2/l2_input_vtr.c \
145 vnet/l2/l2_learn.c \
146 vnet/l2/l2_output_acl.c \
147 vnet/l2/l2_output.c \
148 vnet/l2/l2_patch.c \
149 vnet/l2/l2_rw.c \
150 vnet/l2/l2_vtr.c \
151 vnet/l2/l2_xcrw.c
152
153nobase_include_HEADERS += \
154 vnet/l2/feat_bitmap.h \
155 vnet/l2/l2_input.h \
156 vnet/l2/l2_output.h \
157 vnet/l2/l2_vtr.h \
158 vnet/l2/l2_input_vtr.h \
159 vnet/l2/l2_efp_filter.h \
160 vnet/l2/l2_fwd.h \
161 vnet/l2/l2_bd.h \
162 vnet/l2/l2_bvi.h \
163 vnet/l2/l2_flood.h \
164 vnet/l2/l2_fib.h \
165 vnet/l2/l2_rw.h \
166 vnet/l2/l2_xcrw.h \
167 vnet/l2/l2_classify.h \
168 vnet/l2/l2.api.h
169
170API_FILES += vnet/l2/l2.api
171
172########################################
173# Layer 2 protocol: SRP
174########################################
175libvnet_la_SOURCES += \
176 vnet/srp/format.c \
177 vnet/srp/interface.c \
178 vnet/srp/node.c \
179 vnet/srp/pg.c
180
181nobase_include_HEADERS += \
182 vnet/srp/packet.h \
183 vnet/srp/srp.h
184
185########################################
186# Layer 2 protocol: PPP
187########################################
188libvnet_la_SOURCES += \
189 vnet/ppp/node.c \
190 vnet/ppp/pg.c \
191 vnet/ppp/ppp.c
192
193nobase_include_HEADERS += \
194 vnet/ppp/error.def \
195 vnet/ppp/ppp.h \
196 vnet/ppp/packet.h
197
198########################################
199# Layer 2 protocol: HDLC
200########################################
201libvnet_la_SOURCES += \
202 vnet/hdlc/node.c \
203 vnet/hdlc/pg.c \
204 vnet/hdlc/hdlc.c
205
206nobase_include_HEADERS += \
207 vnet/hdlc/error.def \
208 vnet/hdlc/hdlc.h \
209 vnet/hdlc/packet.h
210
211########################################
212# Layer 2 protocol: LLC
213########################################
214libvnet_la_SOURCES += \
215 vnet/llc/llc.c \
216 vnet/llc/node.c \
217 vnet/llc/pg.c
218
219nobase_include_HEADERS += \
220 vnet/llc/llc.h
221
222########################################
223# Layer 2 protocol: SNAP
224########################################
225libvnet_la_SOURCES += \
226 vnet/snap/snap.c \
227 vnet/snap/node.c \
228 vnet/snap/pg.c
229
230nobase_include_HEADERS += \
231 vnet/snap/snap.h
232
233########################################
234# Layer 2 / vxlan
235########################################
236libvnet_la_SOURCES += \
237 vnet/vxlan/vxlan.c \
238 vnet/vxlan/encap.c \
239 vnet/vxlan/decap.c \
240 vnet/vxlan/vxlan_api.c
241
242nobase_include_HEADERS += \
243 vnet/vxlan/vxlan.h \
244 vnet/vxlan/vxlan_packet.h \
245 vnet/vxlan/vxlan_error.def \
246 vnet/vxlan/vxlan.api.h
247
248API_FILES += vnet/vxlan/vxlan.api
249
250########################################
251# Layer 2 / CDP
252########################################
253libvnet_la_SOURCES += \
254 vnet/cdp/cdp_input.c \
255 vnet/cdp/cdp_node.c \
256 vnet/cdp/cdp_periodic.c
257
258nobase_include_HEADERS += \
259 vnet/cdp/cdp_protocol.h
260
261########################################
262# Layer 2 / LLDP
263########################################
264libvnet_la_SOURCES += \
265 vnet/lldp/lldp_input.c \
266 vnet/lldp/lldp_node.c \
267 vnet/lldp/lldp_output.c \
268 vnet/lldp/lldp_cli.c
269
270nobase_include_HEADERS += \
271 vnet/lldp/lldp_protocol.h
272
273########################################
274# Layer 2/3 "classify"
275########################################
276libvnet_la_SOURCES += \
277 vnet/classify/vnet_classify.c \
278 vnet/classify/ip_classify.c \
279 vnet/classify/input_acl.c \
280 vnet/classify/policer_classify.c \
281 vnet/classify/flow_classify.c \
282 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100283 vnet/classify/vnet_classify.h \
284 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100285
286nobase_include_HEADERS += \
287 vnet/classify/vnet_classify.h \
288 vnet/classify/input_acl.h \
289 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100290 vnet/classify/flow_classify.h \
291 vnet/classify/classify.api.h
292
293API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100294
295########################################
296# Layer 3 protocols go here
297########################################
298
299########################################
300# Layer 3 protocol: IP v4/v6
301########################################
302libvnet_la_SOURCES += \
303 vnet/ip/format.c \
304 vnet/ip/icmp4.c \
305 vnet/ip/icmp6.c \
306 vnet/ip/ip46_cli.c \
307 vnet/ip/ip4_format.c \
308 vnet/ip/ip4_forward.c \
309 vnet/ip/ip4_input.c \
310 vnet/ip/ip4_mtrie.c \
311 vnet/ip/ip4_pg.c \
312 vnet/ip/ip4_source_and_port_range_check.c \
313 vnet/ip/ip4_source_check.c \
314 vnet/ip/ip6_format.c \
315 vnet/ip/ip6_forward.c \
316 vnet/ip/ip6_hop_by_hop.c \
317 vnet/ip/ip6_input.c \
318 vnet/ip/ip6_neighbor.c \
319 vnet/ip/ip6_pg.c \
320 vnet/ip/ip_api.c \
321 vnet/ip/ip_checksum.c \
322 vnet/ip/ip_frag.c \
323 vnet/ip/ip.h \
324 vnet/ip/ip_init.c \
325 vnet/ip/ip_input_acl.c \
326 vnet/ip/lookup.c \
327 vnet/ip/ping.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500328 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100329
330nobase_include_HEADERS += \
331 vnet/ip/format.h \
332 vnet/ip/icmp46_packet.h \
333 vnet/ip/icmp4.h \
334 vnet/ip/icmp6.h \
335 vnet/ip/igmp_packet.h \
336 vnet/ip/ip.api.h \
337 vnet/ip/ip4_error.h \
338 vnet/ip/ip4.h \
339 vnet/ip/ip4_mtrie.h \
340 vnet/ip/ip4_packet.h \
341 vnet/ip/ip6_error.h \
342 vnet/ip/ip6.h \
343 vnet/ip/ip6_hop_by_hop.h \
344 vnet/ip/ip6_hop_by_hop_packet.h \
345 vnet/ip/ip6_packet.h \
346 vnet/ip/ip6_neighbor.h \
347 vnet/ip/ip.h \
348 vnet/ip/ip_packet.h \
349 vnet/ip/ip_source_and_port_range_check.h \
350 vnet/ip/lookup.h \
351 vnet/ip/ports.def \
352 vnet/ip/protocols.def \
353 vnet/ip/punt_error.def \
Dave Barach68b0fb02017-02-28 15:15:56 -0500354 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100355
356API_FILES += vnet/ip/ip.api
357
358########################################
359# Bidirectional Forwarding Detection
360########################################
361
362nobase_include_HEADERS += \
363 vnet/bfd/bfd_protocol.h \
364 vnet/bfd/bfd_main.h \
365 vnet/bfd/bfd_api.h \
366 vnet/bfd/bfd_udp.h \
367 vnet/bfd/bfd.api.h
368
369libvnet_la_SOURCES += \
370 vnet/bfd/bfd_api.h \
371 vnet/bfd/bfd_udp.c \
372 vnet/bfd/bfd_main.c \
373 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100374 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100375 vnet/bfd/bfd_api.c
376
377API_FILES += vnet/bfd/bfd.api
378
379########################################
380# Layer 3 protocol: IPSec
381########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100382if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100383libvnet_la_SOURCES += \
384 vnet/ipsec/ipsec.c \
385 vnet/ipsec/ipsec_cli.c \
386 vnet/ipsec/ipsec_format.c \
387 vnet/ipsec/ipsec_input.c \
388 vnet/ipsec/ipsec_if.c \
389 vnet/ipsec/ipsec_if_in.c \
390 vnet/ipsec/ipsec_if_out.c \
391 vnet/ipsec/esp_encrypt.c \
392 vnet/ipsec/esp_decrypt.c \
393 vnet/ipsec/ikev2.c \
394 vnet/ipsec/ikev2_crypto.c \
395 vnet/ipsec/ikev2_cli.c \
396 vnet/ipsec/ikev2_payload.c \
397 vnet/ipsec/ikev2_format.c \
398 vnet/ipsec/ipsec_api.c
399
400API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100401endif
402
403libvnet_la_SOURCES += \
404 vnet/ipsec/ipsec_output.c
405
406nobase_include_HEADERS += \
407 vnet/ipsec/ipsec.h \
408 vnet/ipsec/esp.h \
409 vnet/ipsec/ikev2.h \
410 vnet/ipsec/ikev2_priv.h \
411 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100412
413########################################
414# Layer 3 protocol: osi
415########################################
416libvnet_la_SOURCES += \
417 vnet/osi/node.c \
418 vnet/osi/osi.c \
419 vnet/osi/pg.c
420
421nobase_include_HEADERS += \
422 vnet/osi/osi.h
423
424########################################
425# Layer 3 protocol: MAP
426########################################
427libvnet_la_SOURCES += \
428 vnet/map/map.c \
429 vnet/map/map_dpo.c \
430 vnet/map/ip4_map.c \
431 vnet/map/ip6_map.c \
432 vnet/map/ip4_map_t.c \
433 vnet/map/ip6_map_t.c \
434 vnet/map/map_api.c
435
436nobase_include_HEADERS += \
437 vnet/map/map.h \
438 vnet/map/map_dpo.h \
439 vnet/map/map.api.h
440
441API_FILES += vnet/map/map.api
442
443if ENABLE_TESTS
444TESTS += test_map
445test_map_SOURCES = \
446 vnet/map/test.c
447test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
448
449test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Damjan Marion0eca04d2017-01-03 20:11:35 +0100450 -lpthread -lvlibmemory -lvlibapi \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100451 -ldl -lsvm -lrt
452
453test_map_LDFLAGS = -static
454endif
455
Dave Barach68b0fb02017-02-28 15:15:56 -0500456########################################
457# Layer 4 protocol: tcp
458########################################
459libvnet_la_SOURCES += \
460 vnet/tcp/tcp_format.c \
461 vnet/tcp/tcp_pg.c \
462 vnet/tcp/tcp_syn_filter4.c \
463 vnet/tcp/tcp_output.c \
464 vnet/tcp/tcp_input.c \
465 vnet/tcp/tcp_newreno.c \
Florin Corase04c2992017-03-01 08:17:34 -0800466 vnet/tcp/builtin_server.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500467 vnet/tcp/tcp.c
468
469nobase_include_HEADERS += \
470 vnet/tcp/tcp_packet.h \
471 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800472 vnet/tcp/tcp_debug.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500473 vnet/tcp/tcp.h
474
475########################################
476# Layer 4 protocol: udp
477########################################
478libvnet_la_SOURCES += \
479 vnet/udp/udp.c \
480 vnet/udp/udp_input.c \
481 vnet/udp/builtin_server.c \
482 vnet/udp/udp_format.c \
483 vnet/udp/udp_local.c \
484 vnet/udp/udp_pg.c
485
486nobase_include_HEADERS += \
487 vnet/udp/udp_error.def \
488 vnet/udp/udp.h \
489 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100490
491########################################
492# Tunnel protocol: gre
493########################################
494libvnet_la_SOURCES += \
495 vnet/gre/gre.c \
496 vnet/gre/node.c \
497 vnet/gre/interface.c \
498 vnet/gre/pg.c \
499 vnet/gre/gre_api.c
500
501nobase_include_HEADERS += \
502 vnet/gre/gre.h \
503 vnet/gre/packet.h \
504 vnet/gre/error.def \
505 vnet/gre/gre.api.h
506
507API_FILES += vnet/gre/gre.api
508
509########################################
510# Tunnel protocol: l2tpv3
511########################################
512libvnet_la_SOURCES += \
513 vnet/l2tp/l2tp.c \
514 vnet/l2tp/encap.c \
515 vnet/l2tp/decap.c \
516 vnet/l2tp/pg.c \
517 vnet/l2tp/l2tp_api.c
518
519nobase_include_HEADERS += \
520 vnet/l2tp/l2tp.h \
521 vnet/l2tp/packet.h \
522 vnet/l2tp/l2tp.api.h
523
524API_FILES += vnet/l2tp/l2tp.api
525
526########################################
527# Tunnel protocol: gre+mpls
528########################################
529libvnet_la_SOURCES += \
530 vnet/mpls/mpls.c \
531 vnet/mpls/mpls_lookup.c \
532 vnet/mpls/mpls_output.c \
533 vnet/mpls/mpls_features.c \
534 vnet/mpls/node.c \
535 vnet/mpls/interface.c \
536 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100537 vnet/mpls/pg.c \
538 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100539
540nobase_include_HEADERS += \
541 vnet/mpls/mpls.h \
542 vnet/mpls/mpls_types.h \
543 vnet/mpls/mpls_tunnel.h \
544 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100545 vnet/mpls/error.def \
546 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100547
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100548API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100549
550########################################
551# Tunnel protocol: vxlan-gpe
552########################################
553
554libvnet_la_SOURCES += \
555 vnet/vxlan-gpe/vxlan_gpe.c \
556 vnet/vxlan-gpe/encap.c \
557 vnet/vxlan-gpe/decap.c \
558 vnet/vxlan-gpe/vxlan_gpe_api.c
559
560nobase_include_HEADERS += \
561 vnet/vxlan-gpe/vxlan_gpe.h \
562 vnet/vxlan-gpe/vxlan_gpe_packet.h \
563 vnet/vxlan-gpe/vxlan_gpe_error.def \
564 vnet/vxlan-gpe/vxlan_gpe.api.h
565
566API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
567
568########################################
569# Tunnel protocol: ipsec+gre
570########################################
571libvnet_la_SOURCES += \
572 vnet/ipsec-gre/ipsec_gre.c \
573 vnet/ipsec-gre/node.c \
574 vnet/ipsec-gre/interface.c \
575 vnet/ipsec-gre/ipsec_gre_api.c
576
577nobase_include_HEADERS += \
578 vnet/ipsec-gre/ipsec_gre.h \
579 vnet/ipsec-gre/error.def \
580 vnet/ipsec-gre/ipsec_gre.api.h
581
582API_FILES += vnet/ipsec-gre/ipsec_gre.api
583
584########################################
585# LISP control plane: lisp-cp
586########################################
587
588libvnet_la_SOURCES += \
589 vnet/lisp-cp/lisp_types.c \
590 vnet/lisp-cp/lisp_cp_dpo.c \
591 vnet/lisp-cp/control.c \
592 vnet/lisp-cp/gid_dictionary.c \
593 vnet/lisp-cp/lisp_msg_serdes.c \
594 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100595 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800596 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100597 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100598 vnet/lisp-cp/lisp_api.c
599
600nobase_include_HEADERS += \
601 vnet/lisp-cp/lisp_types.h \
602 vnet/lisp-cp/packets.h \
603 vnet/lisp-cp/gid_dictionary.h \
604 vnet/lisp-cp/lisp_cp_messages.h \
605 vnet/lisp-cp/lisp_msg_serdes.h \
606 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100607 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100608 vnet/lisp-cp/lisp.api.h
609
610API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100611API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100612
613if ENABLE_TESTS
614LDS = \
615 libvppinfra.la \
616 libvnet.la \
617 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100618 libsvm.la \
619 libsvmdb.la \
620 libvlibapi.la \
621 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100622 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100623
624TESTS += test_cp_serdes test_lisp_types
625
626test_cp_serdes_SOURCES = \
627 tests/vnet/lisp-cp/test_cp_serdes.c \
628 vnet/lisp-cp/lisp_msg_serdes.c \
629 vnet/lisp-cp/lisp_types.c \
630 vnet/lisp-cp/packets.c \
631 vnet/ip/ip_checksum.c
632
633test_lisp_types_SOURCES = \
634 tests/vnet/lisp-cp/test_lisp_types.c \
635 vnet/lisp-cp/lisp_types.c
636
637test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
638test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
639
Damjan Marionc74a86a2017-01-16 14:00:03 +0100640test_cp_serdes_LDADD = $(LDS)
641test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100642endif
643
644########################################
645# Tunnel protocol: lisp-gpe
646########################################
647
648libvnet_la_SOURCES += \
649 vnet/lisp-gpe/lisp_gpe.c \
650 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
651 vnet/lisp-gpe/lisp_gpe_adjacency.c \
652 vnet/lisp-gpe/lisp_gpe_tunnel.c \
653 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
654 vnet/lisp-gpe/lisp_gpe_tenant.c \
655 vnet/lisp-gpe/interface.c \
656 vnet/lisp-gpe/decap.c \
657 vnet/lisp-gpe/lisp_gpe_api.c
658
659nobase_include_HEADERS += \
660 vnet/lisp-gpe/lisp_gpe.h \
661 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
662 vnet/lisp-gpe/lisp_gpe_tenant.h \
663 vnet/lisp-gpe/lisp_gpe_packet.h \
664 vnet/lisp-gpe/lisp_gpe_error.def \
665 vnet/lisp-gpe/lisp_gpe.api.h
666
667API_FILES += vnet/lisp-gpe/lisp_gpe.api
668
669if ENABLE_TESTS
670TESTS += test_test
671
672test_test_SOURCES = tests/vnet/lisp-gpe/test.c
673
674test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
675
676test_test_LDADD = $(LIBOBJS)
677
678noinst_PROGRAMS += $(TESTS)
679check_PROGRAMS += $(TESTS)
680endif
681
682########################################
683# DHCP client
684########################################
685libvnet_la_SOURCES += \
686 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100687 vnet/dhcp/client.h \
688 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100689
690nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800691 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100692 vnet/dhcp/dhcp.api.h
693
694API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100695
696########################################
697# DHCP proxy
698########################################
699libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800700 vnet/dhcp/dhcp6_proxy_node.c \
701 vnet/dhcp/dhcp4_proxy_node.c \
702 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100703
704nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800705 vnet/dhcp/dhcp4_packet.h \
706 vnet/dhcp/dhcp6_packet.h \
707 vnet/dhcp/dhcp_proxy.h \
708 vnet/dhcp/dhcp6_proxy_error.def \
709 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100710
711########################################
712# ipv6 segment routing
713########################################
714
Damjan Mariona9a951f2017-01-16 22:06:10 +0100715if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100716libvnet_la_SOURCES += \
Pablo Camarillofb380952016-12-07 18:34:18 +0100717 vnet/sr/sr.c \
718 vnet/sr/sr_localsid.c \
719 vnet/sr/sr_policy_rewrite.c \
720 vnet/sr/sr_steering.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100721 vnet/sr/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100722endif
723
724nobase_include_HEADERS += \
725 vnet/sr/sr_packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100726 vnet/sr/sr.h \
727 vnet/sr/sr.api.h
728
729API_FILES += vnet/sr/sr.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100730
731########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100732# IPFIX / netflow v10
733########################################
734libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100735 vnet/flow/flow_report.c \
736 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100737
738nobase_include_HEADERS += \
739 vnet/flow/flow_report.h \
740 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100741 vnet/flow/ipfix_packet.h \
742 vnet/flow/flow.api.h
743
744API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100745
746########################################
747# IPFIX classify code
748########################################
749
750libvnet_la_SOURCES += \
751 vnet/flow/flow_report_classify.c
752
753nobase_include_HEADERS += \
754 vnet/flow/flow_report_classify.h
755
756########################################
757# lawful intercept
758########################################
759
760libvnet_la_SOURCES += \
761 vnet/lawful-intercept/lawful_intercept.c \
762 vnet/lawful-intercept/node.c
763
764nobase_include_HEADERS += \
765 vnet/lawful-intercept/lawful_intercept.h
766
767########################################
768# SPAN (port mirroring)
769########################################
770
771libvnet_la_SOURCES += \
772 vnet/span/span_api.c \
773 vnet/span/span.c \
774 vnet/span/node.c
775
776nobase_include_HEADERS += \
777 vnet/span/span.api.h \
778 vnet/span/span.h
779
780API_FILES += vnet/span/span.api
781
782########################################
783# Packet generator
784########################################
785
786libvnet_la_SOURCES += \
787 vnet/pg/cli.c \
788 vnet/pg/edit.c \
789 vnet/pg/init.c \
790 vnet/pg/input.c \
791 vnet/pg/output.c \
792 vnet/pg/stream.c
793
794nobase_include_HEADERS += \
795 vnet/pg/pg.h \
796 vnet/pg/edit.h
797
Damjan Marion7cd468a2016-12-19 23:05:39 +0100798########################################
799# virtio
800########################################
801
802libvnet_la_SOURCES += \
803 vnet/devices/virtio/vhost-user.c \
804 vnet/devices/virtio/vhost_user_api.c
805
806nobase_include_HEADERS += \
807 vnet/devices/virtio/vhost-user.h \
808 vnet/devices/virtio/vhost_user.api.h
809
810API_FILES += vnet/devices/virtio/vhost_user.api
811
812########################################
813# ssvm ethernet
814########################################
815libvnet_la_SOURCES += \
816 vnet/devices/ssvm/ssvm_eth.c \
817 vnet/devices/ssvm/node.c
818
819nobase_include_HEADERS += \
820 vnet/devices/ssvm/ssvm_eth.h
821
822########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500823# session managmeent
824########################################
825
826libvnet_la_SOURCES += \
827 vnet/session/session.c \
828 vnet/session/node.c \
829 vnet/session/transport.c \
830 vnet/session/application.c \
831 vnet/session/session_cli.c \
832 vnet/session/hashes.c \
833 vnet/session/application_interface.c \
834 vnet/session/session_api.c
835
836nobase_include_HEADERS += \
837 vnet/session/session.h \
838 vnet/session/application.h \
839 vnet/session/transport.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800840 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800841 vnet/session/session_debug.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800842 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500843
844API_FILES += vnet/session/session.api
845
846########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100847# Linux packet interface
848########################################
849
850libvnet_la_SOURCES += \
851 vnet/devices/af_packet/af_packet.c \
852 vnet/devices/af_packet/device.c \
853 vnet/devices/af_packet/node.c \
854 vnet/devices/af_packet/cli.c \
855 vnet/devices/af_packet/af_packet_api.c
856
857nobase_include_HEADERS += \
858 vnet/devices/af_packet/af_packet.h \
859 vnet/devices/af_packet/af_packet.api.h
860
861API_FILES += vnet/devices/af_packet/af_packet.api
862
863########################################
864# NETMAP interface
865########################################
866
867libvnet_la_SOURCES += \
868 vnet/devices/netmap/netmap.c \
869 vnet/devices/netmap/device.c \
870 vnet/devices/netmap/node.c \
871 vnet/devices/netmap/cli.c \
872 vnet/devices/netmap/netmap_api.c
873
874nobase_include_HEADERS += \
875 vnet/devices/netmap/netmap.h \
876 vnet/devices/netmap/netmap.api.h
877
878API_FILES += vnet/devices/netmap/netmap.api
879
880########################################
881# Driver feature graph arc support
882########################################
883
884libvnet_la_SOURCES += \
885 vnet/feature/feature.c \
886 vnet/feature/registration.c
887
888nobase_include_HEADERS += \
889 vnet/feature/feature.h
890
891########################################
892# Unix kernel related
893########################################
894
895# FIXME: vnet/unix/hgshm.c
896
897libvnet_la_SOURCES += \
898 vnet/unix/gdb_funcs.c \
899 vnet/unix/pcap.c \
900 vnet/unix/tap_api.c \
901 vnet/unix/tapcli.c \
902 vnet/unix/tuntap.c
903
904nobase_include_HEADERS += \
905 vnet/unix/pcap.h \
906 vnet/unix/tuntap.h \
907 vnet/unix/tap.api.h \
908 vnet/unix/tapcli.h
909
910API_FILES += vnet/unix/tap.api
911
912########################################
913# FIB
914########################################
915
916libvnet_la_SOURCES += \
917 vnet/fib/fib.c \
918 vnet/fib/fib_test.c \
919 vnet/fib/ip4_fib.c \
920 vnet/fib/ip6_fib.c \
921 vnet/fib/mpls_fib.c \
922 vnet/fib/fib_table.c \
923 vnet/fib/fib_walk.c \
924 vnet/fib/fib_types.c \
925 vnet/fib/fib_node.c \
926 vnet/fib/fib_node_list.c \
927 vnet/fib/fib_entry.c \
928 vnet/fib/fib_entry_src.c \
929 vnet/fib/fib_entry_src_rr.c \
930 vnet/fib/fib_entry_src_interface.c \
931 vnet/fib/fib_entry_src_default_route.c \
932 vnet/fib/fib_entry_src_special.c \
933 vnet/fib/fib_entry_src_api.c \
934 vnet/fib/fib_entry_src_adj.c \
935 vnet/fib/fib_entry_src_mpls.c \
936 vnet/fib/fib_entry_src_lisp.c \
937 vnet/fib/fib_entry_cover.c \
938 vnet/fib/fib_entry_delegate.c \
939 vnet/fib/fib_path_list.c \
940 vnet/fib/fib_path.c \
941 vnet/fib/fib_path_ext.c \
942 vnet/fib/fib_urpf_list.c \
943 vnet/fib/fib_attached_export.c
944
945nobase_include_HEADERS += \
946 vnet/fib/fib.h \
947 vnet/fib/fib_api.h \
948 vnet/fib/ip4_fib.h \
949 vnet/fib/ip6_fib.h \
950 vnet/fib/fib_types.h \
951 vnet/fib/fib_table.h \
952 vnet/fib/fib_node.h \
953 vnet/fib/fib_node_list.h \
954 vnet/fib/fib_entry.h \
955 vnet/fib/fib_entry_delegate.h
956
957########################################
958# ADJ
959########################################
960
961libvnet_la_SOURCES += \
962 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100963 vnet/adj/adj_glean.c \
964 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000965 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100966 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800967 vnet/adj/adj_nsh.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100968 vnet/adj/adj.c
969
970nobase_include_HEADERS += \
971 vnet/adj/adj.h \
972 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100973 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800974 vnet/adj/adj_nsh.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100975 vnet/adj/adj_nbr.h
976
977########################################
978# Data-Plane Objects
979########################################
980
981libvnet_la_SOURCES += \
982 vnet/dpo/dpo.c \
983 vnet/dpo/drop_dpo.c \
984 vnet/dpo/ip_null_dpo.c \
985 vnet/dpo/punt_dpo.c \
986 vnet/dpo/receive_dpo.c \
987 vnet/dpo/load_balance.c \
988 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000989 vnet/dpo/lookup_dpo.c \
990 vnet/dpo/classify_dpo.c \
991 vnet/dpo/replicate_dpo.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100992 vnet/dpo/mpls_label_dpo.c
993
994nobase_include_HEADERS += \
995 vnet/dpo/load_balance.h \
996 vnet/dpo/drop_dpo.h \
997 vnet/dpo/lookup_dpo.h \
998 vnet/dpo/punt_dpo.h \
999 vnet/dpo/classify_dpo.h \
1000 vnet/dpo/receive_dpo.h \
1001 vnet/dpo/ip_null_dpo.h \
1002 vnet/dpo/dpo.h
1003
1004########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001005# Multicast FIB
1006########################################
1007
1008libvnet_la_SOURCES += \
1009 vnet/mfib/mfib_test.c \
1010 vnet/mfib/mfib_forward.c \
1011 vnet/mfib/ip4_mfib.c \
1012 vnet/mfib/ip6_mfib.c \
1013 vnet/mfib/mfib_types.c \
1014 vnet/mfib/mfib_signal.c \
1015 vnet/mfib/mfib_itf.c \
1016 vnet/mfib/mfib_entry.c \
1017 vnet/mfib/mfib_table.c
1018
1019nobase_include_HEADERS += \
1020 vnet/mfib/ip4_mfib.h \
1021 vnet/mfib/mfib_types.h \
1022 vnet/mfib/mfib_table.h
1023
1024########################################
1025# Utilities
1026########################################
1027
1028libvnet_la_SOURCES += \
1029 vnet/util/radix.c
1030
1031########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001032# Plugin client library
1033########################################
1034
Damjan Marion7cd468a2016-12-19 23:05:39 +01001035nobase_include_HEADERS += \
1036 vnet/plugin/plugin.h
1037
Damjan Marion7cd468a2016-12-19 23:05:39 +01001038pcap2pg_SOURCES = \
1039 vnet/unix/pcap2pg.c \
1040 vnet/unix/pcap.h
1041
1042pcap2pg_LDFLAGS = -static
1043pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1044
1045noinst_PROGRAMS += pcap2pg
1046
1047# vi:syntax=automake