blob: ebcf0a0a78cb934513bc90a9d218dc09b8a3b052 [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 \
Dave Barach654ceaf2017-03-29 16:59:02 -040022 libvlibmemory.la
Damjan Marion7cd468a2016-12-19 23:05:39 +010023
Damjan Marionc3a814b2017-02-28 19:22:22 +010024libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt
Damjan Marion45a00c42017-01-08 15:34:50 +010025
Damjan Mariona9a951f2017-01-16 22:06:10 +010026if WITH_LIBSSL
Damjan Marion45a00c42017-01-08 15:34:50 +010027libvnet_la_LIBADD += -lcrypto
28endif
Damjan Marion7cd468a2016-12-19 23:05:39 +010029
30########################################
31# Generic stuff
32########################################
33libvnet_la_SOURCES += \
34 vnet/config.c \
35 vnet/devices/devices.c \
36 vnet/handoff.c \
37 vnet/interface.c \
38 vnet/interface_api.c \
39 vnet/interface_cli.c \
40 vnet/interface_format.c \
41 vnet/interface_output.c \
42 vnet/misc.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -080043 vnet/replication.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010044
45nobase_include_HEADERS += \
46 vnet/api_errno.h \
47 vnet/buffer.h \
48 vnet/config.h \
49 vnet/devices/devices.h \
50 vnet/global_funcs.h \
51 vnet/handoff.h \
52 vnet/interface.h \
53 vnet/interface.api.h \
54 vnet/interface_funcs.h \
Matus Fabiana774b532017-05-02 03:15:22 -070055 vnet/ip/ip4_to_ip6.h \
56 vnet/ip/ip6_to_ip4.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +010057 vnet/l3_types.h \
58 vnet/pipeline.h \
59 vnet/replication.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +010060 vnet/vnet.h \
61 vnet/vnet_all_api_h.h \
Gabriel Ganne5842c782017-01-30 13:44:04 +010062 vnet/vnet_msg_enum.h \
63 vnet/util/radix.h
Damjan Marion7cd468a2016-12-19 23:05:39 +010064
65API_FILES += vnet/interface.api
66
67########################################
68# Policer infra
69########################################
70
71libvnet_la_SOURCES += \
72 vnet/policer/node_funcs.c \
73 vnet/policer/policer.c \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010074 vnet/policer/xlate.c \
75 vnet/policer/policer_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010076
77nobase_include_HEADERS += \
78 vnet/policer/police.h \
79 vnet/policer/policer.h \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010080 vnet/policer/xlate.h \
81 vnet/policer/policer.api.h
82
83API_FILES += vnet/policer/policer.api
Damjan Marion7cd468a2016-12-19 23:05:39 +010084
85########################################
86# Cop - junk filter
87########################################
88
89libvnet_la_SOURCES += \
90 vnet/cop/cop.c \
91 vnet/cop/node1.c \
92 vnet/cop/ip4_whitelist.c \
Pavel Kotucek884cf262017-01-25 08:27:15 +010093 vnet/cop/ip6_whitelist.c \
94 vnet/cop/cop_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010095
96nobase_include_HEADERS += \
Pavel Kotucek884cf262017-01-25 08:27:15 +010097 vnet/cop/cop.h \
98 vnet/cop/cop.api.h
99
100API_FILES += vnet/cop/cop.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100101
102########################################
103# Layer 2 protocols go here
104########################################
105
106########################################
107# Layer 2 protocol: Ethernet
108########################################
109libvnet_la_SOURCES += \
110 vnet/ethernet/arp.c \
111 vnet/ethernet/format.c \
112 vnet/ethernet/init.c \
113 vnet/ethernet/interface.c \
114 vnet/ethernet/node.c \
Damjan Marion374e2c52017-03-09 20:38:15 +0100115 vnet/ethernet/pg.c \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200116 vnet/ethernet/sfp.c \
117 vnet/ethernet/p2p_ethernet.c \
118 vnet/ethernet/p2p_ethernet_api.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 \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200126 vnet/ethernet/sfp.h \
127 vnet/ethernet/p2p_ethernet.api.h \
128 vnet/ethernet/p2p_ethernet.h
129
130API_FILES += vnet/ethernet/p2p_ethernet.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100131
132########################################
133# Layer 2 protocol: Ethernet bridging
134########################################
135libvnet_la_SOURCES += \
136 vnet/l2/feat_bitmap.c \
137 vnet/l2/l2_api.c \
138 vnet/l2/l2_bd.c \
139 vnet/l2/l2_bvi.c \
140 vnet/l2/l2_input_classify.c \
141 vnet/l2/l2_output_classify.c \
142 vnet/l2/l2_efp_filter.c \
143 vnet/l2/l2_fib.c \
144 vnet/l2/l2_flood.c \
145 vnet/l2/l2_fwd.c \
146 vnet/l2/l2_input_acl.c \
147 vnet/l2/l2_input.c \
148 vnet/l2/l2_input_vtr.c \
149 vnet/l2/l2_learn.c \
150 vnet/l2/l2_output_acl.c \
151 vnet/l2/l2_output.c \
152 vnet/l2/l2_patch.c \
153 vnet/l2/l2_rw.c \
154 vnet/l2/l2_vtr.c \
155 vnet/l2/l2_xcrw.c
156
157nobase_include_HEADERS += \
158 vnet/l2/feat_bitmap.h \
159 vnet/l2/l2_input.h \
160 vnet/l2/l2_output.h \
161 vnet/l2/l2_vtr.h \
162 vnet/l2/l2_input_vtr.h \
163 vnet/l2/l2_efp_filter.h \
164 vnet/l2/l2_fwd.h \
165 vnet/l2/l2_bd.h \
166 vnet/l2/l2_bvi.h \
167 vnet/l2/l2_flood.h \
168 vnet/l2/l2_fib.h \
169 vnet/l2/l2_rw.h \
170 vnet/l2/l2_xcrw.h \
171 vnet/l2/l2_classify.h \
172 vnet/l2/l2.api.h
173
174API_FILES += vnet/l2/l2.api
175
176########################################
177# Layer 2 protocol: SRP
178########################################
179libvnet_la_SOURCES += \
180 vnet/srp/format.c \
181 vnet/srp/interface.c \
182 vnet/srp/node.c \
183 vnet/srp/pg.c
184
185nobase_include_HEADERS += \
186 vnet/srp/packet.h \
187 vnet/srp/srp.h
188
189########################################
190# Layer 2 protocol: PPP
191########################################
192libvnet_la_SOURCES += \
193 vnet/ppp/node.c \
194 vnet/ppp/pg.c \
195 vnet/ppp/ppp.c
196
197nobase_include_HEADERS += \
198 vnet/ppp/error.def \
199 vnet/ppp/ppp.h \
200 vnet/ppp/packet.h
201
202########################################
203# Layer 2 protocol: HDLC
204########################################
205libvnet_la_SOURCES += \
206 vnet/hdlc/node.c \
207 vnet/hdlc/pg.c \
208 vnet/hdlc/hdlc.c
209
210nobase_include_HEADERS += \
211 vnet/hdlc/error.def \
212 vnet/hdlc/hdlc.h \
213 vnet/hdlc/packet.h
214
215########################################
216# Layer 2 protocol: LLC
217########################################
218libvnet_la_SOURCES += \
219 vnet/llc/llc.c \
220 vnet/llc/node.c \
221 vnet/llc/pg.c
222
223nobase_include_HEADERS += \
224 vnet/llc/llc.h
225
226########################################
227# Layer 2 protocol: SNAP
228########################################
229libvnet_la_SOURCES += \
230 vnet/snap/snap.c \
231 vnet/snap/node.c \
232 vnet/snap/pg.c
233
234nobase_include_HEADERS += \
235 vnet/snap/snap.h
236
237########################################
238# Layer 2 / vxlan
239########################################
240libvnet_la_SOURCES += \
241 vnet/vxlan/vxlan.c \
242 vnet/vxlan/encap.c \
243 vnet/vxlan/decap.c \
244 vnet/vxlan/vxlan_api.c
245
246nobase_include_HEADERS += \
247 vnet/vxlan/vxlan.h \
248 vnet/vxlan/vxlan_packet.h \
249 vnet/vxlan/vxlan_error.def \
250 vnet/vxlan/vxlan.api.h
251
252API_FILES += vnet/vxlan/vxlan.api
253
254########################################
255# Layer 2 / CDP
256########################################
257libvnet_la_SOURCES += \
258 vnet/cdp/cdp_input.c \
259 vnet/cdp/cdp_node.c \
260 vnet/cdp/cdp_periodic.c
261
262nobase_include_HEADERS += \
263 vnet/cdp/cdp_protocol.h
264
265########################################
266# Layer 2 / LLDP
267########################################
268libvnet_la_SOURCES += \
269 vnet/lldp/lldp_input.c \
270 vnet/lldp/lldp_node.c \
271 vnet/lldp/lldp_output.c \
Steve Shin99a0e602017-07-01 04:16:20 +0000272 vnet/lldp/lldp_cli.c \
273 vnet/lldp/lldp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100274
275nobase_include_HEADERS += \
Steve Shin99a0e602017-07-01 04:16:20 +0000276 vnet/lldp/lldp_protocol.h \
277 vnet/lldp/lldp.h \
278 vnet/lldp/lldp.api.h
279
280API_FILES += vnet/lldp/lldp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100281
282########################################
283# Layer 2/3 "classify"
284########################################
285libvnet_la_SOURCES += \
286 vnet/classify/vnet_classify.c \
287 vnet/classify/ip_classify.c \
288 vnet/classify/input_acl.c \
289 vnet/classify/policer_classify.c \
290 vnet/classify/flow_classify.c \
291 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100292 vnet/classify/vnet_classify.h \
293 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100294
295nobase_include_HEADERS += \
296 vnet/classify/vnet_classify.h \
297 vnet/classify/input_acl.h \
298 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100299 vnet/classify/flow_classify.h \
300 vnet/classify/classify.api.h
301
302API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100303
304########################################
305# Layer 3 protocols go here
306########################################
307
308########################################
309# Layer 3 protocol: IP v4/v6
310########################################
311libvnet_la_SOURCES += \
312 vnet/ip/format.c \
313 vnet/ip/icmp4.c \
314 vnet/ip/icmp6.c \
315 vnet/ip/ip46_cli.c \
316 vnet/ip/ip4_format.c \
317 vnet/ip/ip4_forward.c \
318 vnet/ip/ip4_input.c \
319 vnet/ip/ip4_mtrie.c \
320 vnet/ip/ip4_pg.c \
321 vnet/ip/ip4_source_and_port_range_check.c \
322 vnet/ip/ip4_source_check.c \
323 vnet/ip/ip6_format.c \
324 vnet/ip/ip6_forward.c \
325 vnet/ip/ip6_hop_by_hop.c \
326 vnet/ip/ip6_input.c \
327 vnet/ip/ip6_neighbor.c \
328 vnet/ip/ip6_pg.c \
329 vnet/ip/ip_api.c \
330 vnet/ip/ip_checksum.c \
331 vnet/ip/ip_frag.c \
332 vnet/ip/ip.h \
333 vnet/ip/ip_init.c \
334 vnet/ip/ip_input_acl.c \
335 vnet/ip/lookup.c \
336 vnet/ip/ping.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500337 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100338
339nobase_include_HEADERS += \
340 vnet/ip/format.h \
341 vnet/ip/icmp46_packet.h \
342 vnet/ip/icmp4.h \
343 vnet/ip/icmp6.h \
344 vnet/ip/igmp_packet.h \
345 vnet/ip/ip.api.h \
346 vnet/ip/ip4_error.h \
347 vnet/ip/ip4.h \
348 vnet/ip/ip4_mtrie.h \
349 vnet/ip/ip4_packet.h \
350 vnet/ip/ip6_error.h \
351 vnet/ip/ip6.h \
352 vnet/ip/ip6_hop_by_hop.h \
353 vnet/ip/ip6_hop_by_hop_packet.h \
354 vnet/ip/ip6_packet.h \
355 vnet/ip/ip6_neighbor.h \
356 vnet/ip/ip.h \
357 vnet/ip/ip_packet.h \
358 vnet/ip/ip_source_and_port_range_check.h \
359 vnet/ip/lookup.h \
360 vnet/ip/ports.def \
361 vnet/ip/protocols.def \
362 vnet/ip/punt_error.def \
Dave Barach68b0fb02017-02-28 15:15:56 -0500363 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100364
365API_FILES += vnet/ip/ip.api
366
367########################################
368# Bidirectional Forwarding Detection
369########################################
370
371nobase_include_HEADERS += \
372 vnet/bfd/bfd_protocol.h \
373 vnet/bfd/bfd_main.h \
374 vnet/bfd/bfd_api.h \
375 vnet/bfd/bfd_udp.h \
376 vnet/bfd/bfd.api.h
377
378libvnet_la_SOURCES += \
379 vnet/bfd/bfd_api.h \
380 vnet/bfd/bfd_udp.c \
381 vnet/bfd/bfd_main.c \
382 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100383 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100384 vnet/bfd/bfd_api.c
385
386API_FILES += vnet/bfd/bfd.api
387
388########################################
389# Layer 3 protocol: IPSec
390########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100391if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100392libvnet_la_SOURCES += \
393 vnet/ipsec/ipsec.c \
394 vnet/ipsec/ipsec_cli.c \
395 vnet/ipsec/ipsec_format.c \
396 vnet/ipsec/ipsec_input.c \
397 vnet/ipsec/ipsec_if.c \
398 vnet/ipsec/ipsec_if_in.c \
399 vnet/ipsec/ipsec_if_out.c \
400 vnet/ipsec/esp_encrypt.c \
401 vnet/ipsec/esp_decrypt.c \
402 vnet/ipsec/ikev2.c \
403 vnet/ipsec/ikev2_crypto.c \
404 vnet/ipsec/ikev2_cli.c \
405 vnet/ipsec/ikev2_payload.c \
406 vnet/ipsec/ikev2_format.c \
407 vnet/ipsec/ipsec_api.c
408
409API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100410endif
411
412libvnet_la_SOURCES += \
413 vnet/ipsec/ipsec_output.c
414
415nobase_include_HEADERS += \
416 vnet/ipsec/ipsec.h \
417 vnet/ipsec/esp.h \
418 vnet/ipsec/ikev2.h \
419 vnet/ipsec/ikev2_priv.h \
420 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100421
422########################################
423# Layer 3 protocol: osi
424########################################
425libvnet_la_SOURCES += \
426 vnet/osi/node.c \
427 vnet/osi/osi.c \
428 vnet/osi/pg.c
429
430nobase_include_HEADERS += \
431 vnet/osi/osi.h
432
433########################################
434# Layer 3 protocol: MAP
435########################################
436libvnet_la_SOURCES += \
437 vnet/map/map.c \
438 vnet/map/map_dpo.c \
439 vnet/map/ip4_map.c \
440 vnet/map/ip6_map.c \
441 vnet/map/ip4_map_t.c \
442 vnet/map/ip6_map_t.c \
443 vnet/map/map_api.c
444
445nobase_include_HEADERS += \
446 vnet/map/map.h \
447 vnet/map/map_dpo.h \
448 vnet/map/map.api.h
449
450API_FILES += vnet/map/map.api
451
452if ENABLE_TESTS
453TESTS += test_map
454test_map_SOURCES = \
455 vnet/map/test.c
456test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
457
458test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Dave Barach654ceaf2017-03-29 16:59:02 -0400459 -lpthread -lvlibmemory -ldl -lsvm -lrt
Damjan Marion7cd468a2016-12-19 23:05:39 +0100460
461test_map_LDFLAGS = -static
462endif
463
Dave Barach68b0fb02017-02-28 15:15:56 -0500464########################################
465# Layer 4 protocol: tcp
466########################################
467libvnet_la_SOURCES += \
468 vnet/tcp/tcp_format.c \
469 vnet/tcp/tcp_pg.c \
470 vnet/tcp/tcp_syn_filter4.c \
471 vnet/tcp/tcp_output.c \
472 vnet/tcp/tcp_input.c \
473 vnet/tcp/tcp_newreno.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700474 vnet/tcp/builtin_client.c \
Florin Corase04c2992017-03-01 08:17:34 -0800475 vnet/tcp/builtin_server.c \
Dave Barach1015a1e2017-05-08 19:15:03 -0400476 vnet/tcp/builtin_http_server.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700477 vnet/tcp/tcp_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500478 vnet/tcp/tcp.c
479
480nobase_include_HEADERS += \
481 vnet/tcp/tcp_packet.h \
482 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800483 vnet/tcp/tcp_debug.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500484 vnet/tcp/tcp.h
485
486########################################
487# Layer 4 protocol: udp
488########################################
489libvnet_la_SOURCES += \
490 vnet/udp/udp.c \
491 vnet/udp/udp_input.c \
492 vnet/udp/builtin_server.c \
493 vnet/udp/udp_format.c \
494 vnet/udp/udp_local.c \
495 vnet/udp/udp_pg.c
496
497nobase_include_HEADERS += \
498 vnet/udp/udp_error.def \
499 vnet/udp/udp.h \
500 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100501
502########################################
503# Tunnel protocol: gre
504########################################
505libvnet_la_SOURCES += \
506 vnet/gre/gre.c \
507 vnet/gre/node.c \
508 vnet/gre/interface.c \
509 vnet/gre/pg.c \
510 vnet/gre/gre_api.c
511
512nobase_include_HEADERS += \
513 vnet/gre/gre.h \
514 vnet/gre/packet.h \
515 vnet/gre/error.def \
516 vnet/gre/gre.api.h
517
518API_FILES += vnet/gre/gre.api
519
520########################################
521# Tunnel protocol: l2tpv3
522########################################
523libvnet_la_SOURCES += \
524 vnet/l2tp/l2tp.c \
525 vnet/l2tp/encap.c \
526 vnet/l2tp/decap.c \
527 vnet/l2tp/pg.c \
528 vnet/l2tp/l2tp_api.c
529
530nobase_include_HEADERS += \
531 vnet/l2tp/l2tp.h \
532 vnet/l2tp/packet.h \
533 vnet/l2tp/l2tp.api.h
534
535API_FILES += vnet/l2tp/l2tp.api
536
537########################################
538# Tunnel protocol: gre+mpls
539########################################
540libvnet_la_SOURCES += \
541 vnet/mpls/mpls.c \
542 vnet/mpls/mpls_lookup.c \
543 vnet/mpls/mpls_output.c \
544 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400545 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100546 vnet/mpls/interface.c \
547 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100548 vnet/mpls/pg.c \
549 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100550
551nobase_include_HEADERS += \
552 vnet/mpls/mpls.h \
553 vnet/mpls/mpls_types.h \
554 vnet/mpls/mpls_tunnel.h \
555 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100556 vnet/mpls/error.def \
557 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100558
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100559API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100560
561########################################
562# Tunnel protocol: vxlan-gpe
563########################################
564
565libvnet_la_SOURCES += \
566 vnet/vxlan-gpe/vxlan_gpe.c \
567 vnet/vxlan-gpe/encap.c \
568 vnet/vxlan-gpe/decap.c \
569 vnet/vxlan-gpe/vxlan_gpe_api.c
570
571nobase_include_HEADERS += \
572 vnet/vxlan-gpe/vxlan_gpe.h \
573 vnet/vxlan-gpe/vxlan_gpe_packet.h \
574 vnet/vxlan-gpe/vxlan_gpe_error.def \
575 vnet/vxlan-gpe/vxlan_gpe.api.h
576
577API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
578
579########################################
580# Tunnel protocol: ipsec+gre
581########################################
582libvnet_la_SOURCES += \
583 vnet/ipsec-gre/ipsec_gre.c \
584 vnet/ipsec-gre/node.c \
585 vnet/ipsec-gre/interface.c \
586 vnet/ipsec-gre/ipsec_gre_api.c
587
588nobase_include_HEADERS += \
589 vnet/ipsec-gre/ipsec_gre.h \
590 vnet/ipsec-gre/error.def \
591 vnet/ipsec-gre/ipsec_gre.api.h
592
593API_FILES += vnet/ipsec-gre/ipsec_gre.api
594
595########################################
596# LISP control plane: lisp-cp
597########################################
598
599libvnet_la_SOURCES += \
600 vnet/lisp-cp/lisp_types.c \
601 vnet/lisp-cp/lisp_cp_dpo.c \
602 vnet/lisp-cp/control.c \
603 vnet/lisp-cp/gid_dictionary.c \
604 vnet/lisp-cp/lisp_msg_serdes.c \
605 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100606 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800607 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100608 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100609 vnet/lisp-cp/lisp_api.c
610
611nobase_include_HEADERS += \
612 vnet/lisp-cp/lisp_types.h \
613 vnet/lisp-cp/packets.h \
614 vnet/lisp-cp/gid_dictionary.h \
615 vnet/lisp-cp/lisp_cp_messages.h \
616 vnet/lisp-cp/lisp_msg_serdes.h \
617 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100618 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100619 vnet/lisp-cp/lisp.api.h
620
621API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100622API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100623
624if ENABLE_TESTS
625LDS = \
626 libvppinfra.la \
627 libvnet.la \
628 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100629 libsvm.la \
630 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100631 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100632 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100633
634TESTS += test_cp_serdes test_lisp_types
635
636test_cp_serdes_SOURCES = \
637 tests/vnet/lisp-cp/test_cp_serdes.c \
638 vnet/lisp-cp/lisp_msg_serdes.c \
639 vnet/lisp-cp/lisp_types.c \
640 vnet/lisp-cp/packets.c \
641 vnet/ip/ip_checksum.c
642
643test_lisp_types_SOURCES = \
644 tests/vnet/lisp-cp/test_lisp_types.c \
645 vnet/lisp-cp/lisp_types.c
646
647test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
648test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
649
Damjan Marionc74a86a2017-01-16 14:00:03 +0100650test_cp_serdes_LDADD = $(LDS)
651test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100652endif
653
654########################################
655# Tunnel protocol: lisp-gpe
656########################################
657
658libvnet_la_SOURCES += \
659 vnet/lisp-gpe/lisp_gpe.c \
660 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
661 vnet/lisp-gpe/lisp_gpe_adjacency.c \
662 vnet/lisp-gpe/lisp_gpe_tunnel.c \
663 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
664 vnet/lisp-gpe/lisp_gpe_tenant.c \
665 vnet/lisp-gpe/interface.c \
666 vnet/lisp-gpe/decap.c \
667 vnet/lisp-gpe/lisp_gpe_api.c
668
669nobase_include_HEADERS += \
670 vnet/lisp-gpe/lisp_gpe.h \
671 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
672 vnet/lisp-gpe/lisp_gpe_tenant.h \
673 vnet/lisp-gpe/lisp_gpe_packet.h \
674 vnet/lisp-gpe/lisp_gpe_error.def \
675 vnet/lisp-gpe/lisp_gpe.api.h
676
677API_FILES += vnet/lisp-gpe/lisp_gpe.api
678
Damjan Marion7cd468a2016-12-19 23:05:39 +0100679########################################
680# DHCP client
681########################################
682libvnet_la_SOURCES += \
683 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100684 vnet/dhcp/client.h \
685 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100686
687nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800688 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100689 vnet/dhcp/dhcp.api.h
690
691API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100692
693########################################
694# DHCP proxy
695########################################
696libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800697 vnet/dhcp/dhcp6_proxy_node.c \
698 vnet/dhcp/dhcp4_proxy_node.c \
699 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100700
701nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800702 vnet/dhcp/dhcp4_packet.h \
703 vnet/dhcp/dhcp6_packet.h \
704 vnet/dhcp/dhcp_proxy.h \
705 vnet/dhcp/dhcp6_proxy_error.def \
706 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100707
708########################################
709# ipv6 segment routing
710########################################
711
Damjan Marion7cd468a2016-12-19 23:05:39 +0100712libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200713 vnet/srv6/sr.c \
714 vnet/srv6/sr_localsid.c \
715 vnet/srv6/sr_policy_rewrite.c \
716 vnet/srv6/sr_steering.c \
717 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100718
719nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200720 vnet/srv6/sr_packet.h \
721 vnet/srv6/sr.h \
722 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100723
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200724API_FILES += vnet/srv6/sr.api
725
726########################################
727# mpls segment routing
728########################################
729
730libvnet_la_SOURCES += \
731 vnet/srmpls/sr_mpls_policy.c \
732 vnet/srmpls/sr_mpls_steering.c
733
734
735nobase_include_HEADERS += \
736 vnet/srmpls/sr.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100737
738########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100739# IPFIX / netflow v10
740########################################
741libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100742 vnet/flow/flow_report.c \
743 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100744
745nobase_include_HEADERS += \
746 vnet/flow/flow_report.h \
747 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100748 vnet/flow/ipfix_packet.h \
749 vnet/flow/flow.api.h
750
751API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100752
753########################################
754# IPFIX classify code
755########################################
756
757libvnet_la_SOURCES += \
758 vnet/flow/flow_report_classify.c
759
760nobase_include_HEADERS += \
761 vnet/flow/flow_report_classify.h
762
763########################################
764# lawful intercept
765########################################
766
767libvnet_la_SOURCES += \
768 vnet/lawful-intercept/lawful_intercept.c \
769 vnet/lawful-intercept/node.c
770
771nobase_include_HEADERS += \
772 vnet/lawful-intercept/lawful_intercept.h
773
774########################################
775# SPAN (port mirroring)
776########################################
777
778libvnet_la_SOURCES += \
779 vnet/span/span_api.c \
780 vnet/span/span.c \
781 vnet/span/node.c
782
783nobase_include_HEADERS += \
784 vnet/span/span.api.h \
785 vnet/span/span.h
786
787API_FILES += vnet/span/span.api
788
789########################################
790# Packet generator
791########################################
792
793libvnet_la_SOURCES += \
794 vnet/pg/cli.c \
795 vnet/pg/edit.c \
796 vnet/pg/init.c \
797 vnet/pg/input.c \
798 vnet/pg/output.c \
799 vnet/pg/stream.c
800
801nobase_include_HEADERS += \
802 vnet/pg/pg.h \
803 vnet/pg/edit.h
804
Damjan Marion7cd468a2016-12-19 23:05:39 +0100805########################################
806# virtio
807########################################
808
809libvnet_la_SOURCES += \
810 vnet/devices/virtio/vhost-user.c \
811 vnet/devices/virtio/vhost_user_api.c
812
813nobase_include_HEADERS += \
814 vnet/devices/virtio/vhost-user.h \
815 vnet/devices/virtio/vhost_user.api.h
816
817API_FILES += vnet/devices/virtio/vhost_user.api
818
819########################################
820# ssvm ethernet
821########################################
822libvnet_la_SOURCES += \
823 vnet/devices/ssvm/ssvm_eth.c \
824 vnet/devices/ssvm/node.c
825
826nobase_include_HEADERS += \
827 vnet/devices/ssvm/ssvm_eth.h
828
829########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500830# session managmeent
831########################################
832
833libvnet_la_SOURCES += \
834 vnet/session/session.c \
835 vnet/session/node.c \
836 vnet/session/transport.c \
837 vnet/session/application.c \
838 vnet/session/session_cli.c \
839 vnet/session/hashes.c \
840 vnet/session/application_interface.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700841 vnet/session/segment_manager.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500842 vnet/session/session_api.c
843
844nobase_include_HEADERS += \
845 vnet/session/session.h \
846 vnet/session/application.h \
847 vnet/session/transport.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800848 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800849 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700850 vnet/session/segment_manager.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800851 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500852
853API_FILES += vnet/session/session.api
854
855########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100856# Linux packet interface
857########################################
858
859libvnet_la_SOURCES += \
860 vnet/devices/af_packet/af_packet.c \
861 vnet/devices/af_packet/device.c \
862 vnet/devices/af_packet/node.c \
863 vnet/devices/af_packet/cli.c \
864 vnet/devices/af_packet/af_packet_api.c
865
866nobase_include_HEADERS += \
867 vnet/devices/af_packet/af_packet.h \
868 vnet/devices/af_packet/af_packet.api.h
869
870API_FILES += vnet/devices/af_packet/af_packet.api
871
872########################################
873# NETMAP interface
874########################################
875
876libvnet_la_SOURCES += \
877 vnet/devices/netmap/netmap.c \
878 vnet/devices/netmap/device.c \
879 vnet/devices/netmap/node.c \
880 vnet/devices/netmap/cli.c \
881 vnet/devices/netmap/netmap_api.c
882
883nobase_include_HEADERS += \
884 vnet/devices/netmap/netmap.h \
885 vnet/devices/netmap/netmap.api.h
886
887API_FILES += vnet/devices/netmap/netmap.api
888
889########################################
890# Driver feature graph arc support
891########################################
892
893libvnet_la_SOURCES += \
894 vnet/feature/feature.c \
895 vnet/feature/registration.c
896
897nobase_include_HEADERS += \
898 vnet/feature/feature.h
899
900########################################
901# Unix kernel related
902########################################
903
904# FIXME: vnet/unix/hgshm.c
905
906libvnet_la_SOURCES += \
907 vnet/unix/gdb_funcs.c \
908 vnet/unix/pcap.c \
909 vnet/unix/tap_api.c \
910 vnet/unix/tapcli.c \
911 vnet/unix/tuntap.c
912
913nobase_include_HEADERS += \
914 vnet/unix/pcap.h \
915 vnet/unix/tuntap.h \
916 vnet/unix/tap.api.h \
917 vnet/unix/tapcli.h
918
919API_FILES += vnet/unix/tap.api
920
921########################################
922# FIB
923########################################
924
925libvnet_la_SOURCES += \
926 vnet/fib/fib.c \
927 vnet/fib/fib_test.c \
928 vnet/fib/ip4_fib.c \
929 vnet/fib/ip6_fib.c \
930 vnet/fib/mpls_fib.c \
931 vnet/fib/fib_table.c \
932 vnet/fib/fib_walk.c \
933 vnet/fib/fib_types.c \
934 vnet/fib/fib_node.c \
935 vnet/fib/fib_node_list.c \
936 vnet/fib/fib_entry.c \
937 vnet/fib/fib_entry_src.c \
938 vnet/fib/fib_entry_src_rr.c \
939 vnet/fib/fib_entry_src_interface.c \
940 vnet/fib/fib_entry_src_default_route.c \
941 vnet/fib/fib_entry_src_special.c \
942 vnet/fib/fib_entry_src_api.c \
943 vnet/fib/fib_entry_src_adj.c \
944 vnet/fib/fib_entry_src_mpls.c \
945 vnet/fib/fib_entry_src_lisp.c \
946 vnet/fib/fib_entry_cover.c \
947 vnet/fib/fib_entry_delegate.c \
948 vnet/fib/fib_path_list.c \
949 vnet/fib/fib_path.c \
950 vnet/fib/fib_path_ext.c \
951 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700952 vnet/fib/fib_attached_export.c \
953 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100954
955nobase_include_HEADERS += \
956 vnet/fib/fib.h \
957 vnet/fib/fib_api.h \
958 vnet/fib/ip4_fib.h \
959 vnet/fib/ip6_fib.h \
960 vnet/fib/fib_types.h \
961 vnet/fib/fib_table.h \
962 vnet/fib/fib_node.h \
963 vnet/fib/fib_node_list.h \
964 vnet/fib/fib_entry.h \
965 vnet/fib/fib_entry_delegate.h
966
967########################################
968# ADJ
969########################################
970
971libvnet_la_SOURCES += \
972 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100973 vnet/adj/adj_glean.c \
974 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000975 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100976 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800977 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800978 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700979 vnet/adj/rewrite.c \
980 vnet/adj/adj_bfd.c \
981 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100982
983nobase_include_HEADERS += \
984 vnet/adj/adj.h \
985 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100986 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800987 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800988 vnet/adj/adj_nbr.h \
989 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100990
991########################################
992# Data-Plane Objects
993########################################
994
995libvnet_la_SOURCES += \
996 vnet/dpo/dpo.c \
997 vnet/dpo/drop_dpo.c \
998 vnet/dpo/ip_null_dpo.c \
999 vnet/dpo/punt_dpo.c \
1000 vnet/dpo/receive_dpo.c \
1001 vnet/dpo/load_balance.c \
1002 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001003 vnet/dpo/lookup_dpo.c \
1004 vnet/dpo/classify_dpo.c \
1005 vnet/dpo/replicate_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -08001006 vnet/dpo/interface_dpo.c \
1007 vnet/dpo/mpls_disposition.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001008 vnet/dpo/mpls_label_dpo.c
1009
1010nobase_include_HEADERS += \
1011 vnet/dpo/load_balance.h \
1012 vnet/dpo/drop_dpo.h \
1013 vnet/dpo/lookup_dpo.h \
1014 vnet/dpo/punt_dpo.h \
1015 vnet/dpo/classify_dpo.h \
1016 vnet/dpo/receive_dpo.h \
1017 vnet/dpo/ip_null_dpo.h \
1018 vnet/dpo/dpo.h
1019
1020########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001021# Multicast FIB
1022########################################
1023
1024libvnet_la_SOURCES += \
1025 vnet/mfib/mfib_test.c \
1026 vnet/mfib/mfib_forward.c \
1027 vnet/mfib/ip4_mfib.c \
1028 vnet/mfib/ip6_mfib.c \
1029 vnet/mfib/mfib_types.c \
1030 vnet/mfib/mfib_signal.c \
1031 vnet/mfib/mfib_itf.c \
1032 vnet/mfib/mfib_entry.c \
1033 vnet/mfib/mfib_table.c
1034
1035nobase_include_HEADERS += \
1036 vnet/mfib/ip4_mfib.h \
1037 vnet/mfib/mfib_types.h \
1038 vnet/mfib/mfib_table.h
1039
1040########################################
1041# Utilities
1042########################################
1043
1044libvnet_la_SOURCES += \
1045 vnet/util/radix.c
1046
1047########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001048# Plugin client library
1049########################################
1050
Damjan Marion7cd468a2016-12-19 23:05:39 +01001051nobase_include_HEADERS += \
1052 vnet/plugin/plugin.h
1053
Damjan Marion7cd468a2016-12-19 23:05:39 +01001054pcap2pg_SOURCES = \
1055 vnet/unix/pcap2pg.c \
1056 vnet/unix/pcap.h
1057
1058pcap2pg_LDFLAGS = -static
1059pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1060
1061noinst_PROGRAMS += pcap2pg
1062
1063# vi:syntax=automake