blob: 15b3467c772f62c966ec83c777057cd1081168c7 [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 \
Pavel Kotucek15ac81c2017-06-20 14:00:26 +0200118 vnet/ethernet/p2p_ethernet_input.c \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200119 vnet/ethernet/p2p_ethernet_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100120
121nobase_include_HEADERS += \
122 vnet/ethernet/arp_packet.h \
123 vnet/ethernet/error.def \
124 vnet/ethernet/ethernet.h \
125 vnet/ethernet/packet.h \
Damjan Marion374e2c52017-03-09 20:38:15 +0100126 vnet/ethernet/types.def \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200127 vnet/ethernet/sfp.h \
128 vnet/ethernet/p2p_ethernet.api.h \
129 vnet/ethernet/p2p_ethernet.h
130
131API_FILES += vnet/ethernet/p2p_ethernet.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100132
133########################################
134# Layer 2 protocol: Ethernet bridging
135########################################
136libvnet_la_SOURCES += \
137 vnet/l2/feat_bitmap.c \
138 vnet/l2/l2_api.c \
139 vnet/l2/l2_bd.c \
140 vnet/l2/l2_bvi.c \
141 vnet/l2/l2_input_classify.c \
142 vnet/l2/l2_output_classify.c \
143 vnet/l2/l2_efp_filter.c \
144 vnet/l2/l2_fib.c \
145 vnet/l2/l2_flood.c \
146 vnet/l2/l2_fwd.c \
147 vnet/l2/l2_input_acl.c \
148 vnet/l2/l2_input.c \
149 vnet/l2/l2_input_vtr.c \
150 vnet/l2/l2_learn.c \
151 vnet/l2/l2_output_acl.c \
152 vnet/l2/l2_output.c \
153 vnet/l2/l2_patch.c \
154 vnet/l2/l2_rw.c \
155 vnet/l2/l2_vtr.c \
156 vnet/l2/l2_xcrw.c
157
158nobase_include_HEADERS += \
159 vnet/l2/feat_bitmap.h \
160 vnet/l2/l2_input.h \
161 vnet/l2/l2_output.h \
162 vnet/l2/l2_vtr.h \
163 vnet/l2/l2_input_vtr.h \
164 vnet/l2/l2_efp_filter.h \
165 vnet/l2/l2_fwd.h \
166 vnet/l2/l2_bd.h \
167 vnet/l2/l2_bvi.h \
168 vnet/l2/l2_flood.h \
169 vnet/l2/l2_fib.h \
170 vnet/l2/l2_rw.h \
171 vnet/l2/l2_xcrw.h \
172 vnet/l2/l2_classify.h \
173 vnet/l2/l2.api.h
174
175API_FILES += vnet/l2/l2.api
176
177########################################
178# Layer 2 protocol: SRP
179########################################
180libvnet_la_SOURCES += \
181 vnet/srp/format.c \
182 vnet/srp/interface.c \
183 vnet/srp/node.c \
184 vnet/srp/pg.c
185
186nobase_include_HEADERS += \
187 vnet/srp/packet.h \
188 vnet/srp/srp.h
189
190########################################
191# Layer 2 protocol: PPP
192########################################
193libvnet_la_SOURCES += \
194 vnet/ppp/node.c \
195 vnet/ppp/pg.c \
196 vnet/ppp/ppp.c
197
198nobase_include_HEADERS += \
199 vnet/ppp/error.def \
200 vnet/ppp/ppp.h \
201 vnet/ppp/packet.h
202
203########################################
204# Layer 2 protocol: HDLC
205########################################
206libvnet_la_SOURCES += \
207 vnet/hdlc/node.c \
208 vnet/hdlc/pg.c \
209 vnet/hdlc/hdlc.c
210
211nobase_include_HEADERS += \
212 vnet/hdlc/error.def \
213 vnet/hdlc/hdlc.h \
214 vnet/hdlc/packet.h
215
216########################################
217# Layer 2 protocol: LLC
218########################################
219libvnet_la_SOURCES += \
220 vnet/llc/llc.c \
221 vnet/llc/node.c \
222 vnet/llc/pg.c
223
224nobase_include_HEADERS += \
225 vnet/llc/llc.h
226
227########################################
228# Layer 2 protocol: SNAP
229########################################
230libvnet_la_SOURCES += \
231 vnet/snap/snap.c \
232 vnet/snap/node.c \
233 vnet/snap/pg.c
234
235nobase_include_HEADERS += \
236 vnet/snap/snap.h
237
238########################################
239# Layer 2 / vxlan
240########################################
241libvnet_la_SOURCES += \
242 vnet/vxlan/vxlan.c \
243 vnet/vxlan/encap.c \
244 vnet/vxlan/decap.c \
245 vnet/vxlan/vxlan_api.c
246
247nobase_include_HEADERS += \
248 vnet/vxlan/vxlan.h \
249 vnet/vxlan/vxlan_packet.h \
250 vnet/vxlan/vxlan_error.def \
251 vnet/vxlan/vxlan.api.h
252
253API_FILES += vnet/vxlan/vxlan.api
254
255########################################
Marco Varleseb598f1d2017-09-19 14:25:28 +0200256# Layer 2 / Geneve
257########################################
258libvnet_la_SOURCES += \
259 vnet/geneve/geneve.c \
260 vnet/geneve/encap.c \
261 vnet/geneve/decap.c \
262 vnet/geneve/geneve_api.c
263
264nobase_include_HEADERS += \
265 vnet/geneve/geneve.h \
266 vnet/geneve/geneve_packet.h \
267 vnet/geneve/geneve_error.def \
268 vnet/geneve/geneve.api.h
269
270API_FILES += vnet/geneve/geneve.api
271
272########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100273# Layer 2 / CDP
274########################################
275libvnet_la_SOURCES += \
276 vnet/cdp/cdp_input.c \
277 vnet/cdp/cdp_node.c \
278 vnet/cdp/cdp_periodic.c
279
280nobase_include_HEADERS += \
281 vnet/cdp/cdp_protocol.h
282
283########################################
284# Layer 2 / LLDP
285########################################
286libvnet_la_SOURCES += \
287 vnet/lldp/lldp_input.c \
288 vnet/lldp/lldp_node.c \
289 vnet/lldp/lldp_output.c \
Steve Shin99a0e602017-07-01 04:16:20 +0000290 vnet/lldp/lldp_cli.c \
291 vnet/lldp/lldp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100292
293nobase_include_HEADERS += \
Steve Shin99a0e602017-07-01 04:16:20 +0000294 vnet/lldp/lldp_protocol.h \
295 vnet/lldp/lldp.h \
296 vnet/lldp/lldp.api.h
297
298API_FILES += vnet/lldp/lldp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100299
300########################################
301# Layer 2/3 "classify"
302########################################
303libvnet_la_SOURCES += \
304 vnet/classify/vnet_classify.c \
305 vnet/classify/ip_classify.c \
306 vnet/classify/input_acl.c \
307 vnet/classify/policer_classify.c \
308 vnet/classify/flow_classify.c \
309 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100310 vnet/classify/vnet_classify.h \
311 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100312
313nobase_include_HEADERS += \
314 vnet/classify/vnet_classify.h \
315 vnet/classify/input_acl.h \
316 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100317 vnet/classify/flow_classify.h \
318 vnet/classify/classify.api.h
319
320API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100321
322########################################
323# Layer 3 protocols go here
324########################################
325
326########################################
327# Layer 3 protocol: IP v4/v6
328########################################
329libvnet_la_SOURCES += \
330 vnet/ip/format.c \
331 vnet/ip/icmp4.c \
332 vnet/ip/icmp6.c \
333 vnet/ip/ip46_cli.c \
334 vnet/ip/ip4_format.c \
335 vnet/ip/ip4_forward.c \
336 vnet/ip/ip4_input.c \
337 vnet/ip/ip4_mtrie.c \
338 vnet/ip/ip4_pg.c \
339 vnet/ip/ip4_source_and_port_range_check.c \
340 vnet/ip/ip4_source_check.c \
341 vnet/ip/ip6_format.c \
342 vnet/ip/ip6_forward.c \
343 vnet/ip/ip6_hop_by_hop.c \
344 vnet/ip/ip6_input.c \
345 vnet/ip/ip6_neighbor.c \
346 vnet/ip/ip6_pg.c \
347 vnet/ip/ip_api.c \
348 vnet/ip/ip_checksum.c \
349 vnet/ip/ip_frag.c \
350 vnet/ip/ip.h \
351 vnet/ip/ip_init.c \
352 vnet/ip/ip_input_acl.c \
353 vnet/ip/lookup.c \
354 vnet/ip/ping.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500355 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100356
357nobase_include_HEADERS += \
358 vnet/ip/format.h \
359 vnet/ip/icmp46_packet.h \
360 vnet/ip/icmp4.h \
361 vnet/ip/icmp6.h \
362 vnet/ip/igmp_packet.h \
363 vnet/ip/ip.api.h \
364 vnet/ip/ip4_error.h \
365 vnet/ip/ip4.h \
366 vnet/ip/ip4_mtrie.h \
367 vnet/ip/ip4_packet.h \
368 vnet/ip/ip6_error.h \
369 vnet/ip/ip6.h \
370 vnet/ip/ip6_hop_by_hop.h \
371 vnet/ip/ip6_hop_by_hop_packet.h \
372 vnet/ip/ip6_packet.h \
373 vnet/ip/ip6_neighbor.h \
374 vnet/ip/ip.h \
375 vnet/ip/ip_packet.h \
376 vnet/ip/ip_source_and_port_range_check.h \
377 vnet/ip/lookup.h \
378 vnet/ip/ports.def \
379 vnet/ip/protocols.def \
380 vnet/ip/punt_error.def \
Dave Barach68b0fb02017-02-28 15:15:56 -0500381 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100382
383API_FILES += vnet/ip/ip.api
384
385########################################
386# Bidirectional Forwarding Detection
387########################################
388
389nobase_include_HEADERS += \
390 vnet/bfd/bfd_protocol.h \
391 vnet/bfd/bfd_main.h \
392 vnet/bfd/bfd_api.h \
393 vnet/bfd/bfd_udp.h \
394 vnet/bfd/bfd.api.h
395
396libvnet_la_SOURCES += \
397 vnet/bfd/bfd_api.h \
398 vnet/bfd/bfd_udp.c \
399 vnet/bfd/bfd_main.c \
400 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100401 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100402 vnet/bfd/bfd_api.c
403
404API_FILES += vnet/bfd/bfd.api
405
406########################################
407# Layer 3 protocol: IPSec
408########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100409if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100410libvnet_la_SOURCES += \
411 vnet/ipsec/ipsec.c \
412 vnet/ipsec/ipsec_cli.c \
413 vnet/ipsec/ipsec_format.c \
414 vnet/ipsec/ipsec_input.c \
415 vnet/ipsec/ipsec_if.c \
416 vnet/ipsec/ipsec_if_in.c \
417 vnet/ipsec/ipsec_if_out.c \
Sergio Gonzalez Monroydb93cd92017-08-26 15:22:05 +0100418 vnet/ipsec/esp_format.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100419 vnet/ipsec/esp_encrypt.c \
420 vnet/ipsec/esp_decrypt.c \
421 vnet/ipsec/ikev2.c \
422 vnet/ipsec/ikev2_crypto.c \
423 vnet/ipsec/ikev2_cli.c \
424 vnet/ipsec/ikev2_payload.c \
425 vnet/ipsec/ikev2_format.c \
426 vnet/ipsec/ipsec_api.c
427
428API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100429endif
430
431libvnet_la_SOURCES += \
432 vnet/ipsec/ipsec_output.c
433
434nobase_include_HEADERS += \
435 vnet/ipsec/ipsec.h \
436 vnet/ipsec/esp.h \
437 vnet/ipsec/ikev2.h \
438 vnet/ipsec/ikev2_priv.h \
439 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100440
441########################################
442# Layer 3 protocol: osi
443########################################
444libvnet_la_SOURCES += \
445 vnet/osi/node.c \
446 vnet/osi/osi.c \
447 vnet/osi/pg.c
448
449nobase_include_HEADERS += \
450 vnet/osi/osi.h
451
452########################################
453# Layer 3 protocol: MAP
454########################################
455libvnet_la_SOURCES += \
456 vnet/map/map.c \
457 vnet/map/map_dpo.c \
458 vnet/map/ip4_map.c \
459 vnet/map/ip6_map.c \
460 vnet/map/ip4_map_t.c \
461 vnet/map/ip6_map_t.c \
462 vnet/map/map_api.c
463
464nobase_include_HEADERS += \
465 vnet/map/map.h \
466 vnet/map/map_dpo.h \
467 vnet/map/map.api.h
468
469API_FILES += vnet/map/map.api
470
471if ENABLE_TESTS
472TESTS += test_map
473test_map_SOURCES = \
474 vnet/map/test.c
475test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
476
477test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Dave Barach654ceaf2017-03-29 16:59:02 -0400478 -lpthread -lvlibmemory -ldl -lsvm -lrt
Damjan Marion7cd468a2016-12-19 23:05:39 +0100479
480test_map_LDFLAGS = -static
481endif
482
Dave Barach68b0fb02017-02-28 15:15:56 -0500483########################################
484# Layer 4 protocol: tcp
485########################################
486libvnet_la_SOURCES += \
Dave Barach3bbcfab2017-08-15 19:03:44 -0400487 vnet/tcp/tcp_api.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500488 vnet/tcp/tcp_format.c \
489 vnet/tcp/tcp_pg.c \
490 vnet/tcp/tcp_syn_filter4.c \
491 vnet/tcp/tcp_output.c \
492 vnet/tcp/tcp_input.c \
493 vnet/tcp/tcp_newreno.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700494 vnet/tcp/builtin_client.c \
Florin Corase04c2992017-03-01 08:17:34 -0800495 vnet/tcp/builtin_server.c \
Dave Barach1015a1e2017-05-08 19:15:03 -0400496 vnet/tcp/builtin_http_server.c \
Dave Barach52851e62017-08-07 09:35:25 -0400497 vnet/tcp/builtin_proxy.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700498 vnet/tcp/tcp_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500499 vnet/tcp/tcp.c
500
501nobase_include_HEADERS += \
502 vnet/tcp/tcp_packet.h \
503 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800504 vnet/tcp/tcp_debug.h \
Florin Corasc940f092017-08-23 11:24:02 -0700505 vnet/tcp/tcp.h \
506 vnet/tcp/tcp.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500507
Dave Barach3bbcfab2017-08-15 19:03:44 -0400508API_FILES += vnet/tcp/tcp.api
509
Dave Barach68b0fb02017-02-28 15:15:56 -0500510########################################
511# Layer 4 protocol: udp
512########################################
513libvnet_la_SOURCES += \
514 vnet/udp/udp.c \
515 vnet/udp/udp_input.c \
516 vnet/udp/builtin_server.c \
517 vnet/udp/udp_format.c \
518 vnet/udp/udp_local.c \
519 vnet/udp/udp_pg.c
520
521nobase_include_HEADERS += \
522 vnet/udp/udp_error.def \
523 vnet/udp/udp.h \
524 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100525
526########################################
527# Tunnel protocol: gre
528########################################
529libvnet_la_SOURCES += \
530 vnet/gre/gre.c \
531 vnet/gre/node.c \
532 vnet/gre/interface.c \
533 vnet/gre/pg.c \
534 vnet/gre/gre_api.c
535
536nobase_include_HEADERS += \
537 vnet/gre/gre.h \
538 vnet/gre/packet.h \
539 vnet/gre/error.def \
540 vnet/gre/gre.api.h
541
542API_FILES += vnet/gre/gre.api
543
544########################################
545# Tunnel protocol: l2tpv3
546########################################
547libvnet_la_SOURCES += \
548 vnet/l2tp/l2tp.c \
549 vnet/l2tp/encap.c \
550 vnet/l2tp/decap.c \
551 vnet/l2tp/pg.c \
552 vnet/l2tp/l2tp_api.c
553
554nobase_include_HEADERS += \
555 vnet/l2tp/l2tp.h \
556 vnet/l2tp/packet.h \
557 vnet/l2tp/l2tp.api.h
558
559API_FILES += vnet/l2tp/l2tp.api
560
561########################################
562# Tunnel protocol: gre+mpls
563########################################
564libvnet_la_SOURCES += \
565 vnet/mpls/mpls.c \
566 vnet/mpls/mpls_lookup.c \
567 vnet/mpls/mpls_output.c \
568 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400569 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100570 vnet/mpls/interface.c \
571 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100572 vnet/mpls/pg.c \
573 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100574
575nobase_include_HEADERS += \
576 vnet/mpls/mpls.h \
577 vnet/mpls/mpls_types.h \
578 vnet/mpls/mpls_tunnel.h \
579 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100580 vnet/mpls/error.def \
581 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100582
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100583API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100584
585########################################
586# Tunnel protocol: vxlan-gpe
587########################################
588
589libvnet_la_SOURCES += \
590 vnet/vxlan-gpe/vxlan_gpe.c \
591 vnet/vxlan-gpe/encap.c \
592 vnet/vxlan-gpe/decap.c \
593 vnet/vxlan-gpe/vxlan_gpe_api.c
594
595nobase_include_HEADERS += \
596 vnet/vxlan-gpe/vxlan_gpe.h \
597 vnet/vxlan-gpe/vxlan_gpe_packet.h \
598 vnet/vxlan-gpe/vxlan_gpe_error.def \
599 vnet/vxlan-gpe/vxlan_gpe.api.h
600
601API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
602
603########################################
604# Tunnel protocol: ipsec+gre
605########################################
606libvnet_la_SOURCES += \
607 vnet/ipsec-gre/ipsec_gre.c \
608 vnet/ipsec-gre/node.c \
609 vnet/ipsec-gre/interface.c \
610 vnet/ipsec-gre/ipsec_gre_api.c
611
612nobase_include_HEADERS += \
613 vnet/ipsec-gre/ipsec_gre.h \
614 vnet/ipsec-gre/error.def \
615 vnet/ipsec-gre/ipsec_gre.api.h
616
617API_FILES += vnet/ipsec-gre/ipsec_gre.api
618
619########################################
620# LISP control plane: lisp-cp
621########################################
622
623libvnet_la_SOURCES += \
624 vnet/lisp-cp/lisp_types.c \
625 vnet/lisp-cp/lisp_cp_dpo.c \
626 vnet/lisp-cp/control.c \
627 vnet/lisp-cp/gid_dictionary.c \
628 vnet/lisp-cp/lisp_msg_serdes.c \
629 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100630 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800631 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100632 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100633 vnet/lisp-cp/lisp_api.c
634
635nobase_include_HEADERS += \
636 vnet/lisp-cp/lisp_types.h \
637 vnet/lisp-cp/packets.h \
638 vnet/lisp-cp/gid_dictionary.h \
639 vnet/lisp-cp/lisp_cp_messages.h \
640 vnet/lisp-cp/lisp_msg_serdes.h \
641 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100642 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100643 vnet/lisp-cp/lisp.api.h
644
645API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100646API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100647
648if ENABLE_TESTS
649LDS = \
650 libvppinfra.la \
651 libvnet.la \
652 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100653 libsvm.la \
654 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100655 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100656 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100657
658TESTS += test_cp_serdes test_lisp_types
659
660test_cp_serdes_SOURCES = \
661 tests/vnet/lisp-cp/test_cp_serdes.c \
662 vnet/lisp-cp/lisp_msg_serdes.c \
663 vnet/lisp-cp/lisp_types.c \
664 vnet/lisp-cp/packets.c \
665 vnet/ip/ip_checksum.c
666
667test_lisp_types_SOURCES = \
668 tests/vnet/lisp-cp/test_lisp_types.c \
669 vnet/lisp-cp/lisp_types.c
670
671test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
672test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
673
Damjan Marionc74a86a2017-01-16 14:00:03 +0100674test_cp_serdes_LDADD = $(LDS)
675test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100676endif
677
678########################################
679# Tunnel protocol: lisp-gpe
680########################################
681
682libvnet_la_SOURCES += \
683 vnet/lisp-gpe/lisp_gpe.c \
684 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
685 vnet/lisp-gpe/lisp_gpe_adjacency.c \
686 vnet/lisp-gpe/lisp_gpe_tunnel.c \
687 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
688 vnet/lisp-gpe/lisp_gpe_tenant.c \
689 vnet/lisp-gpe/interface.c \
690 vnet/lisp-gpe/decap.c \
691 vnet/lisp-gpe/lisp_gpe_api.c
692
693nobase_include_HEADERS += \
694 vnet/lisp-gpe/lisp_gpe.h \
695 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
696 vnet/lisp-gpe/lisp_gpe_tenant.h \
697 vnet/lisp-gpe/lisp_gpe_packet.h \
698 vnet/lisp-gpe/lisp_gpe_error.def \
699 vnet/lisp-gpe/lisp_gpe.api.h
700
701API_FILES += vnet/lisp-gpe/lisp_gpe.api
702
Damjan Marion7cd468a2016-12-19 23:05:39 +0100703########################################
704# DHCP client
705########################################
706libvnet_la_SOURCES += \
707 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100708 vnet/dhcp/client.h \
709 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100710
711nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800712 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100713 vnet/dhcp/dhcp.api.h
714
715API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100716
717########################################
718# DHCP proxy
719########################################
720libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800721 vnet/dhcp/dhcp6_proxy_node.c \
722 vnet/dhcp/dhcp4_proxy_node.c \
723 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100724
725nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800726 vnet/dhcp/dhcp4_packet.h \
727 vnet/dhcp/dhcp6_packet.h \
728 vnet/dhcp/dhcp_proxy.h \
729 vnet/dhcp/dhcp6_proxy_error.def \
730 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100731
732########################################
733# ipv6 segment routing
734########################################
735
Damjan Marion7cd468a2016-12-19 23:05:39 +0100736libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200737 vnet/srv6/sr.c \
738 vnet/srv6/sr_localsid.c \
739 vnet/srv6/sr_policy_rewrite.c \
740 vnet/srv6/sr_steering.c \
741 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100742
743nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200744 vnet/srv6/sr_packet.h \
745 vnet/srv6/sr.h \
746 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100747
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200748API_FILES += vnet/srv6/sr.api
749
750########################################
751# mpls segment routing
752########################################
753
754libvnet_la_SOURCES += \
755 vnet/srmpls/sr_mpls_policy.c \
756 vnet/srmpls/sr_mpls_steering.c
757
758
759nobase_include_HEADERS += \
760 vnet/srmpls/sr.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100761
762########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100763# IPFIX / netflow v10
764########################################
765libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100766 vnet/flow/flow_report.c \
767 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100768
769nobase_include_HEADERS += \
770 vnet/flow/flow_report.h \
771 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100772 vnet/flow/ipfix_packet.h \
773 vnet/flow/flow.api.h
774
775API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100776
777########################################
778# IPFIX classify code
779########################################
780
781libvnet_la_SOURCES += \
782 vnet/flow/flow_report_classify.c
783
784nobase_include_HEADERS += \
785 vnet/flow/flow_report_classify.h
786
787########################################
788# lawful intercept
789########################################
790
791libvnet_la_SOURCES += \
792 vnet/lawful-intercept/lawful_intercept.c \
793 vnet/lawful-intercept/node.c
794
795nobase_include_HEADERS += \
796 vnet/lawful-intercept/lawful_intercept.h
797
798########################################
799# SPAN (port mirroring)
800########################################
801
802libvnet_la_SOURCES += \
803 vnet/span/span_api.c \
804 vnet/span/span.c \
805 vnet/span/node.c
806
807nobase_include_HEADERS += \
808 vnet/span/span.api.h \
809 vnet/span/span.h
810
811API_FILES += vnet/span/span.api
812
813########################################
814# Packet generator
815########################################
816
817libvnet_la_SOURCES += \
818 vnet/pg/cli.c \
819 vnet/pg/edit.c \
820 vnet/pg/init.c \
821 vnet/pg/input.c \
822 vnet/pg/output.c \
823 vnet/pg/stream.c
824
825nobase_include_HEADERS += \
826 vnet/pg/pg.h \
827 vnet/pg/edit.h
828
Damjan Marion7cd468a2016-12-19 23:05:39 +0100829########################################
830# virtio
831########################################
832
833libvnet_la_SOURCES += \
834 vnet/devices/virtio/vhost-user.c \
835 vnet/devices/virtio/vhost_user_api.c
836
837nobase_include_HEADERS += \
838 vnet/devices/virtio/vhost-user.h \
839 vnet/devices/virtio/vhost_user.api.h
840
841API_FILES += vnet/devices/virtio/vhost_user.api
842
843########################################
844# ssvm ethernet
845########################################
846libvnet_la_SOURCES += \
847 vnet/devices/ssvm/ssvm_eth.c \
848 vnet/devices/ssvm/node.c
849
850nobase_include_HEADERS += \
851 vnet/devices/ssvm/ssvm_eth.h
852
853########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500854# session managmeent
855########################################
856
857libvnet_la_SOURCES += \
858 vnet/session/session.c \
Florin Coras04e53442017-07-16 17:12:15 -0700859 vnet/session/session_lookup.c \
860 vnet/session/session_node.c \
861 vnet/session/transport_interface.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500862 vnet/session/application.c \
863 vnet/session/session_cli.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500864 vnet/session/application_interface.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700865 vnet/session/segment_manager.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500866 vnet/session/session_api.c
867
868nobase_include_HEADERS += \
869 vnet/session/session.h \
Florin Coras04e53442017-07-16 17:12:15 -0700870 vnet/session/stream_session.h \
871 vnet/session/session_lookup.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500872 vnet/session/application.h \
873 vnet/session/transport.h \
Florin Coras04e53442017-07-16 17:12:15 -0700874 vnet/session/transport_interface.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800875 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800876 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700877 vnet/session/segment_manager.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800878 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500879
880API_FILES += vnet/session/session.api
881
882########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100883# Linux packet interface
884########################################
885
886libvnet_la_SOURCES += \
887 vnet/devices/af_packet/af_packet.c \
888 vnet/devices/af_packet/device.c \
889 vnet/devices/af_packet/node.c \
890 vnet/devices/af_packet/cli.c \
891 vnet/devices/af_packet/af_packet_api.c
892
893nobase_include_HEADERS += \
894 vnet/devices/af_packet/af_packet.h \
895 vnet/devices/af_packet/af_packet.api.h
896
897API_FILES += vnet/devices/af_packet/af_packet.api
898
899########################################
900# NETMAP interface
901########################################
902
903libvnet_la_SOURCES += \
904 vnet/devices/netmap/netmap.c \
905 vnet/devices/netmap/device.c \
906 vnet/devices/netmap/node.c \
907 vnet/devices/netmap/cli.c \
908 vnet/devices/netmap/netmap_api.c
909
910nobase_include_HEADERS += \
911 vnet/devices/netmap/netmap.h \
912 vnet/devices/netmap/netmap.api.h
913
914API_FILES += vnet/devices/netmap/netmap.api
915
916########################################
917# Driver feature graph arc support
918########################################
919
920libvnet_la_SOURCES += \
921 vnet/feature/feature.c \
922 vnet/feature/registration.c
923
924nobase_include_HEADERS += \
925 vnet/feature/feature.h
926
927########################################
928# Unix kernel related
929########################################
930
931# FIXME: vnet/unix/hgshm.c
932
933libvnet_la_SOURCES += \
934 vnet/unix/gdb_funcs.c \
935 vnet/unix/pcap.c \
936 vnet/unix/tap_api.c \
937 vnet/unix/tapcli.c \
938 vnet/unix/tuntap.c
939
940nobase_include_HEADERS += \
941 vnet/unix/pcap.h \
942 vnet/unix/tuntap.h \
943 vnet/unix/tap.api.h \
944 vnet/unix/tapcli.h
945
946API_FILES += vnet/unix/tap.api
947
948########################################
949# FIB
950########################################
951
952libvnet_la_SOURCES += \
953 vnet/fib/fib.c \
954 vnet/fib/fib_test.c \
955 vnet/fib/ip4_fib.c \
956 vnet/fib/ip6_fib.c \
957 vnet/fib/mpls_fib.c \
958 vnet/fib/fib_table.c \
959 vnet/fib/fib_walk.c \
960 vnet/fib/fib_types.c \
961 vnet/fib/fib_node.c \
962 vnet/fib/fib_node_list.c \
963 vnet/fib/fib_entry.c \
964 vnet/fib/fib_entry_src.c \
965 vnet/fib/fib_entry_src_rr.c \
966 vnet/fib/fib_entry_src_interface.c \
967 vnet/fib/fib_entry_src_default_route.c \
968 vnet/fib/fib_entry_src_special.c \
969 vnet/fib/fib_entry_src_api.c \
970 vnet/fib/fib_entry_src_adj.c \
971 vnet/fib/fib_entry_src_mpls.c \
972 vnet/fib/fib_entry_src_lisp.c \
973 vnet/fib/fib_entry_cover.c \
974 vnet/fib/fib_entry_delegate.c \
975 vnet/fib/fib_path_list.c \
976 vnet/fib/fib_path.c \
977 vnet/fib/fib_path_ext.c \
978 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700979 vnet/fib/fib_attached_export.c \
980 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100981
982nobase_include_HEADERS += \
983 vnet/fib/fib.h \
984 vnet/fib/fib_api.h \
985 vnet/fib/ip4_fib.h \
986 vnet/fib/ip6_fib.h \
987 vnet/fib/fib_types.h \
988 vnet/fib/fib_table.h \
989 vnet/fib/fib_node.h \
990 vnet/fib/fib_node_list.h \
991 vnet/fib/fib_entry.h \
992 vnet/fib/fib_entry_delegate.h
993
994########################################
995# ADJ
996########################################
997
998libvnet_la_SOURCES += \
999 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001000 vnet/adj/adj_glean.c \
1001 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001002 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001003 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -08001004 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -08001005 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -07001006 vnet/adj/rewrite.c \
1007 vnet/adj/adj_bfd.c \
1008 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +01001009
1010nobase_include_HEADERS += \
1011 vnet/adj/adj.h \
1012 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001013 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -08001014 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -08001015 vnet/adj/adj_nbr.h \
1016 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +01001017
1018########################################
1019# Data-Plane Objects
1020########################################
1021
1022libvnet_la_SOURCES += \
1023 vnet/dpo/dpo.c \
1024 vnet/dpo/drop_dpo.c \
1025 vnet/dpo/ip_null_dpo.c \
1026 vnet/dpo/punt_dpo.c \
1027 vnet/dpo/receive_dpo.c \
1028 vnet/dpo/load_balance.c \
1029 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001030 vnet/dpo/lookup_dpo.c \
1031 vnet/dpo/classify_dpo.c \
1032 vnet/dpo/replicate_dpo.c \
Neale Ranns43161a82017-08-12 02:12:00 -07001033 vnet/dpo/interface_rx_dpo.c \
1034 vnet/dpo/interface_tx_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -08001035 vnet/dpo/mpls_disposition.c \
Neale Ranns6f631152017-10-03 08:20:21 -07001036 vnet/dpo/mpls_label_dpo.c \
1037 vnet/dpo/l2_bridge_dpo.c
Damjan Marion7cd468a2016-12-19 23:05:39 +01001038
1039nobase_include_HEADERS += \
1040 vnet/dpo/load_balance.h \
1041 vnet/dpo/drop_dpo.h \
1042 vnet/dpo/lookup_dpo.h \
1043 vnet/dpo/punt_dpo.h \
1044 vnet/dpo/classify_dpo.h \
1045 vnet/dpo/receive_dpo.h \
1046 vnet/dpo/ip_null_dpo.h \
1047 vnet/dpo/dpo.h
1048
1049########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001050# Multicast FIB
1051########################################
1052
1053libvnet_la_SOURCES += \
1054 vnet/mfib/mfib_test.c \
1055 vnet/mfib/mfib_forward.c \
1056 vnet/mfib/ip4_mfib.c \
1057 vnet/mfib/ip6_mfib.c \
1058 vnet/mfib/mfib_types.c \
1059 vnet/mfib/mfib_signal.c \
1060 vnet/mfib/mfib_itf.c \
1061 vnet/mfib/mfib_entry.c \
1062 vnet/mfib/mfib_table.c
1063
1064nobase_include_HEADERS += \
1065 vnet/mfib/ip4_mfib.h \
1066 vnet/mfib/mfib_types.h \
1067 vnet/mfib/mfib_table.h
1068
1069########################################
1070# Utilities
1071########################################
1072
1073libvnet_la_SOURCES += \
1074 vnet/util/radix.c
1075
1076########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001077# Plugin client library
1078########################################
1079
Damjan Marion7cd468a2016-12-19 23:05:39 +01001080nobase_include_HEADERS += \
1081 vnet/plugin/plugin.h
1082
Damjan Marion7cd468a2016-12-19 23:05:39 +01001083pcap2pg_SOURCES = \
1084 vnet/unix/pcap2pg.c \
1085 vnet/unix/pcap.h
1086
1087pcap2pg_LDFLAGS = -static
1088pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1089
1090noinst_PROGRAMS += pcap2pg
1091
1092# vi:syntax=automake