blob: 055d3a7f9069095a2e5eea527343a82644bb8947 [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########################################
256# Layer 2 / CDP
257########################################
258libvnet_la_SOURCES += \
259 vnet/cdp/cdp_input.c \
260 vnet/cdp/cdp_node.c \
261 vnet/cdp/cdp_periodic.c
262
263nobase_include_HEADERS += \
264 vnet/cdp/cdp_protocol.h
265
266########################################
267# Layer 2 / LLDP
268########################################
269libvnet_la_SOURCES += \
270 vnet/lldp/lldp_input.c \
271 vnet/lldp/lldp_node.c \
272 vnet/lldp/lldp_output.c \
Steve Shin99a0e602017-07-01 04:16:20 +0000273 vnet/lldp/lldp_cli.c \
274 vnet/lldp/lldp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100275
276nobase_include_HEADERS += \
Steve Shin99a0e602017-07-01 04:16:20 +0000277 vnet/lldp/lldp_protocol.h \
278 vnet/lldp/lldp.h \
279 vnet/lldp/lldp.api.h
280
281API_FILES += vnet/lldp/lldp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100282
283########################################
284# Layer 2/3 "classify"
285########################################
286libvnet_la_SOURCES += \
287 vnet/classify/vnet_classify.c \
288 vnet/classify/ip_classify.c \
289 vnet/classify/input_acl.c \
290 vnet/classify/policer_classify.c \
291 vnet/classify/flow_classify.c \
292 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100293 vnet/classify/vnet_classify.h \
294 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100295
296nobase_include_HEADERS += \
297 vnet/classify/vnet_classify.h \
298 vnet/classify/input_acl.h \
299 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100300 vnet/classify/flow_classify.h \
301 vnet/classify/classify.api.h
302
303API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100304
305########################################
306# Layer 3 protocols go here
307########################################
308
309########################################
310# Layer 3 protocol: IP v4/v6
311########################################
312libvnet_la_SOURCES += \
313 vnet/ip/format.c \
314 vnet/ip/icmp4.c \
315 vnet/ip/icmp6.c \
316 vnet/ip/ip46_cli.c \
317 vnet/ip/ip4_format.c \
318 vnet/ip/ip4_forward.c \
319 vnet/ip/ip4_input.c \
320 vnet/ip/ip4_mtrie.c \
321 vnet/ip/ip4_pg.c \
322 vnet/ip/ip4_source_and_port_range_check.c \
323 vnet/ip/ip4_source_check.c \
324 vnet/ip/ip6_format.c \
325 vnet/ip/ip6_forward.c \
326 vnet/ip/ip6_hop_by_hop.c \
327 vnet/ip/ip6_input.c \
328 vnet/ip/ip6_neighbor.c \
329 vnet/ip/ip6_pg.c \
330 vnet/ip/ip_api.c \
331 vnet/ip/ip_checksum.c \
332 vnet/ip/ip_frag.c \
333 vnet/ip/ip.h \
334 vnet/ip/ip_init.c \
335 vnet/ip/ip_input_acl.c \
336 vnet/ip/lookup.c \
337 vnet/ip/ping.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500338 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100339
340nobase_include_HEADERS += \
341 vnet/ip/format.h \
342 vnet/ip/icmp46_packet.h \
343 vnet/ip/icmp4.h \
344 vnet/ip/icmp6.h \
345 vnet/ip/igmp_packet.h \
346 vnet/ip/ip.api.h \
347 vnet/ip/ip4_error.h \
348 vnet/ip/ip4.h \
349 vnet/ip/ip4_mtrie.h \
350 vnet/ip/ip4_packet.h \
351 vnet/ip/ip6_error.h \
352 vnet/ip/ip6.h \
353 vnet/ip/ip6_hop_by_hop.h \
354 vnet/ip/ip6_hop_by_hop_packet.h \
355 vnet/ip/ip6_packet.h \
356 vnet/ip/ip6_neighbor.h \
357 vnet/ip/ip.h \
358 vnet/ip/ip_packet.h \
359 vnet/ip/ip_source_and_port_range_check.h \
360 vnet/ip/lookup.h \
361 vnet/ip/ports.def \
362 vnet/ip/protocols.def \
363 vnet/ip/punt_error.def \
Dave Barach68b0fb02017-02-28 15:15:56 -0500364 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100365
366API_FILES += vnet/ip/ip.api
367
368########################################
369# Bidirectional Forwarding Detection
370########################################
371
372nobase_include_HEADERS += \
373 vnet/bfd/bfd_protocol.h \
374 vnet/bfd/bfd_main.h \
375 vnet/bfd/bfd_api.h \
376 vnet/bfd/bfd_udp.h \
377 vnet/bfd/bfd.api.h
378
379libvnet_la_SOURCES += \
380 vnet/bfd/bfd_api.h \
381 vnet/bfd/bfd_udp.c \
382 vnet/bfd/bfd_main.c \
383 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100384 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100385 vnet/bfd/bfd_api.c
386
387API_FILES += vnet/bfd/bfd.api
388
389########################################
390# Layer 3 protocol: IPSec
391########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100392if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100393libvnet_la_SOURCES += \
394 vnet/ipsec/ipsec.c \
395 vnet/ipsec/ipsec_cli.c \
396 vnet/ipsec/ipsec_format.c \
397 vnet/ipsec/ipsec_input.c \
398 vnet/ipsec/ipsec_if.c \
399 vnet/ipsec/ipsec_if_in.c \
400 vnet/ipsec/ipsec_if_out.c \
401 vnet/ipsec/esp_encrypt.c \
402 vnet/ipsec/esp_decrypt.c \
403 vnet/ipsec/ikev2.c \
404 vnet/ipsec/ikev2_crypto.c \
405 vnet/ipsec/ikev2_cli.c \
406 vnet/ipsec/ikev2_payload.c \
407 vnet/ipsec/ikev2_format.c \
408 vnet/ipsec/ipsec_api.c
409
410API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100411endif
412
413libvnet_la_SOURCES += \
414 vnet/ipsec/ipsec_output.c
415
416nobase_include_HEADERS += \
417 vnet/ipsec/ipsec.h \
418 vnet/ipsec/esp.h \
419 vnet/ipsec/ikev2.h \
420 vnet/ipsec/ikev2_priv.h \
421 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100422
423########################################
424# Layer 3 protocol: osi
425########################################
426libvnet_la_SOURCES += \
427 vnet/osi/node.c \
428 vnet/osi/osi.c \
429 vnet/osi/pg.c
430
431nobase_include_HEADERS += \
432 vnet/osi/osi.h
433
434########################################
435# Layer 3 protocol: MAP
436########################################
437libvnet_la_SOURCES += \
438 vnet/map/map.c \
439 vnet/map/map_dpo.c \
440 vnet/map/ip4_map.c \
441 vnet/map/ip6_map.c \
442 vnet/map/ip4_map_t.c \
443 vnet/map/ip6_map_t.c \
444 vnet/map/map_api.c
445
446nobase_include_HEADERS += \
447 vnet/map/map.h \
448 vnet/map/map_dpo.h \
449 vnet/map/map.api.h
450
451API_FILES += vnet/map/map.api
452
453if ENABLE_TESTS
454TESTS += test_map
455test_map_SOURCES = \
456 vnet/map/test.c
457test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
458
459test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Dave Barach654ceaf2017-03-29 16:59:02 -0400460 -lpthread -lvlibmemory -ldl -lsvm -lrt
Damjan Marion7cd468a2016-12-19 23:05:39 +0100461
462test_map_LDFLAGS = -static
463endif
464
Dave Barach68b0fb02017-02-28 15:15:56 -0500465########################################
466# Layer 4 protocol: tcp
467########################################
468libvnet_la_SOURCES += \
Dave Barach3bbcfab2017-08-15 19:03:44 -0400469 vnet/tcp/tcp_api.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500470 vnet/tcp/tcp_format.c \
471 vnet/tcp/tcp_pg.c \
472 vnet/tcp/tcp_syn_filter4.c \
473 vnet/tcp/tcp_output.c \
474 vnet/tcp/tcp_input.c \
475 vnet/tcp/tcp_newreno.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700476 vnet/tcp/builtin_client.c \
Florin Corase04c2992017-03-01 08:17:34 -0800477 vnet/tcp/builtin_server.c \
Dave Barach1015a1e2017-05-08 19:15:03 -0400478 vnet/tcp/builtin_http_server.c \
Dave Barach52851e62017-08-07 09:35:25 -0400479 vnet/tcp/builtin_proxy.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700480 vnet/tcp/tcp_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500481 vnet/tcp/tcp.c
482
483nobase_include_HEADERS += \
484 vnet/tcp/tcp_packet.h \
485 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800486 vnet/tcp/tcp_debug.h \
Florin Corasc940f092017-08-23 11:24:02 -0700487 vnet/tcp/tcp.h \
488 vnet/tcp/tcp.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500489
Dave Barach3bbcfab2017-08-15 19:03:44 -0400490API_FILES += vnet/tcp/tcp.api
491
Dave Barach68b0fb02017-02-28 15:15:56 -0500492########################################
493# Layer 4 protocol: udp
494########################################
495libvnet_la_SOURCES += \
496 vnet/udp/udp.c \
497 vnet/udp/udp_input.c \
498 vnet/udp/builtin_server.c \
499 vnet/udp/udp_format.c \
500 vnet/udp/udp_local.c \
501 vnet/udp/udp_pg.c
502
503nobase_include_HEADERS += \
504 vnet/udp/udp_error.def \
505 vnet/udp/udp.h \
506 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100507
508########################################
509# Tunnel protocol: gre
510########################################
511libvnet_la_SOURCES += \
512 vnet/gre/gre.c \
513 vnet/gre/node.c \
514 vnet/gre/interface.c \
515 vnet/gre/pg.c \
516 vnet/gre/gre_api.c
517
518nobase_include_HEADERS += \
519 vnet/gre/gre.h \
520 vnet/gre/packet.h \
521 vnet/gre/error.def \
522 vnet/gre/gre.api.h
523
524API_FILES += vnet/gre/gre.api
525
526########################################
527# Tunnel protocol: l2tpv3
528########################################
529libvnet_la_SOURCES += \
530 vnet/l2tp/l2tp.c \
531 vnet/l2tp/encap.c \
532 vnet/l2tp/decap.c \
533 vnet/l2tp/pg.c \
534 vnet/l2tp/l2tp_api.c
535
536nobase_include_HEADERS += \
537 vnet/l2tp/l2tp.h \
538 vnet/l2tp/packet.h \
539 vnet/l2tp/l2tp.api.h
540
541API_FILES += vnet/l2tp/l2tp.api
542
543########################################
544# Tunnel protocol: gre+mpls
545########################################
546libvnet_la_SOURCES += \
547 vnet/mpls/mpls.c \
548 vnet/mpls/mpls_lookup.c \
549 vnet/mpls/mpls_output.c \
550 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400551 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100552 vnet/mpls/interface.c \
553 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100554 vnet/mpls/pg.c \
555 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100556
557nobase_include_HEADERS += \
558 vnet/mpls/mpls.h \
559 vnet/mpls/mpls_types.h \
560 vnet/mpls/mpls_tunnel.h \
561 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100562 vnet/mpls/error.def \
563 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100564
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100565API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100566
567########################################
568# Tunnel protocol: vxlan-gpe
569########################################
570
571libvnet_la_SOURCES += \
572 vnet/vxlan-gpe/vxlan_gpe.c \
573 vnet/vxlan-gpe/encap.c \
574 vnet/vxlan-gpe/decap.c \
575 vnet/vxlan-gpe/vxlan_gpe_api.c
576
577nobase_include_HEADERS += \
578 vnet/vxlan-gpe/vxlan_gpe.h \
579 vnet/vxlan-gpe/vxlan_gpe_packet.h \
580 vnet/vxlan-gpe/vxlan_gpe_error.def \
581 vnet/vxlan-gpe/vxlan_gpe.api.h
582
583API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
584
585########################################
586# Tunnel protocol: ipsec+gre
587########################################
588libvnet_la_SOURCES += \
589 vnet/ipsec-gre/ipsec_gre.c \
590 vnet/ipsec-gre/node.c \
591 vnet/ipsec-gre/interface.c \
592 vnet/ipsec-gre/ipsec_gre_api.c
593
594nobase_include_HEADERS += \
595 vnet/ipsec-gre/ipsec_gre.h \
596 vnet/ipsec-gre/error.def \
597 vnet/ipsec-gre/ipsec_gre.api.h
598
599API_FILES += vnet/ipsec-gre/ipsec_gre.api
600
601########################################
602# LISP control plane: lisp-cp
603########################################
604
605libvnet_la_SOURCES += \
606 vnet/lisp-cp/lisp_types.c \
607 vnet/lisp-cp/lisp_cp_dpo.c \
608 vnet/lisp-cp/control.c \
609 vnet/lisp-cp/gid_dictionary.c \
610 vnet/lisp-cp/lisp_msg_serdes.c \
611 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100612 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800613 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100614 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100615 vnet/lisp-cp/lisp_api.c
616
617nobase_include_HEADERS += \
618 vnet/lisp-cp/lisp_types.h \
619 vnet/lisp-cp/packets.h \
620 vnet/lisp-cp/gid_dictionary.h \
621 vnet/lisp-cp/lisp_cp_messages.h \
622 vnet/lisp-cp/lisp_msg_serdes.h \
623 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100624 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100625 vnet/lisp-cp/lisp.api.h
626
627API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100628API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100629
630if ENABLE_TESTS
631LDS = \
632 libvppinfra.la \
633 libvnet.la \
634 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100635 libsvm.la \
636 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100637 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100638 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100639
640TESTS += test_cp_serdes test_lisp_types
641
642test_cp_serdes_SOURCES = \
643 tests/vnet/lisp-cp/test_cp_serdes.c \
644 vnet/lisp-cp/lisp_msg_serdes.c \
645 vnet/lisp-cp/lisp_types.c \
646 vnet/lisp-cp/packets.c \
647 vnet/ip/ip_checksum.c
648
649test_lisp_types_SOURCES = \
650 tests/vnet/lisp-cp/test_lisp_types.c \
651 vnet/lisp-cp/lisp_types.c
652
653test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
654test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
655
Damjan Marionc74a86a2017-01-16 14:00:03 +0100656test_cp_serdes_LDADD = $(LDS)
657test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100658endif
659
660########################################
661# Tunnel protocol: lisp-gpe
662########################################
663
664libvnet_la_SOURCES += \
665 vnet/lisp-gpe/lisp_gpe.c \
666 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
667 vnet/lisp-gpe/lisp_gpe_adjacency.c \
668 vnet/lisp-gpe/lisp_gpe_tunnel.c \
669 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
670 vnet/lisp-gpe/lisp_gpe_tenant.c \
671 vnet/lisp-gpe/interface.c \
672 vnet/lisp-gpe/decap.c \
673 vnet/lisp-gpe/lisp_gpe_api.c
674
675nobase_include_HEADERS += \
676 vnet/lisp-gpe/lisp_gpe.h \
677 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
678 vnet/lisp-gpe/lisp_gpe_tenant.h \
679 vnet/lisp-gpe/lisp_gpe_packet.h \
680 vnet/lisp-gpe/lisp_gpe_error.def \
681 vnet/lisp-gpe/lisp_gpe.api.h
682
683API_FILES += vnet/lisp-gpe/lisp_gpe.api
684
Damjan Marion7cd468a2016-12-19 23:05:39 +0100685########################################
686# DHCP client
687########################################
688libvnet_la_SOURCES += \
689 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100690 vnet/dhcp/client.h \
691 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100692
693nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800694 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100695 vnet/dhcp/dhcp.api.h
696
697API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100698
699########################################
700# DHCP proxy
701########################################
702libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800703 vnet/dhcp/dhcp6_proxy_node.c \
704 vnet/dhcp/dhcp4_proxy_node.c \
705 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100706
707nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800708 vnet/dhcp/dhcp4_packet.h \
709 vnet/dhcp/dhcp6_packet.h \
710 vnet/dhcp/dhcp_proxy.h \
711 vnet/dhcp/dhcp6_proxy_error.def \
712 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100713
714########################################
715# ipv6 segment routing
716########################################
717
Damjan Marion7cd468a2016-12-19 23:05:39 +0100718libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200719 vnet/srv6/sr.c \
720 vnet/srv6/sr_localsid.c \
721 vnet/srv6/sr_policy_rewrite.c \
722 vnet/srv6/sr_steering.c \
723 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100724
725nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200726 vnet/srv6/sr_packet.h \
727 vnet/srv6/sr.h \
728 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100729
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200730API_FILES += vnet/srv6/sr.api
731
732########################################
733# mpls segment routing
734########################################
735
736libvnet_la_SOURCES += \
737 vnet/srmpls/sr_mpls_policy.c \
738 vnet/srmpls/sr_mpls_steering.c
739
740
741nobase_include_HEADERS += \
742 vnet/srmpls/sr.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100743
744########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100745# IPFIX / netflow v10
746########################################
747libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100748 vnet/flow/flow_report.c \
749 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100750
751nobase_include_HEADERS += \
752 vnet/flow/flow_report.h \
753 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100754 vnet/flow/ipfix_packet.h \
755 vnet/flow/flow.api.h
756
757API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100758
759########################################
760# IPFIX classify code
761########################################
762
763libvnet_la_SOURCES += \
764 vnet/flow/flow_report_classify.c
765
766nobase_include_HEADERS += \
767 vnet/flow/flow_report_classify.h
768
769########################################
770# lawful intercept
771########################################
772
773libvnet_la_SOURCES += \
774 vnet/lawful-intercept/lawful_intercept.c \
775 vnet/lawful-intercept/node.c
776
777nobase_include_HEADERS += \
778 vnet/lawful-intercept/lawful_intercept.h
779
780########################################
781# SPAN (port mirroring)
782########################################
783
784libvnet_la_SOURCES += \
785 vnet/span/span_api.c \
786 vnet/span/span.c \
787 vnet/span/node.c
788
789nobase_include_HEADERS += \
790 vnet/span/span.api.h \
791 vnet/span/span.h
792
793API_FILES += vnet/span/span.api
794
795########################################
796# Packet generator
797########################################
798
799libvnet_la_SOURCES += \
800 vnet/pg/cli.c \
801 vnet/pg/edit.c \
802 vnet/pg/init.c \
803 vnet/pg/input.c \
804 vnet/pg/output.c \
805 vnet/pg/stream.c
806
807nobase_include_HEADERS += \
808 vnet/pg/pg.h \
809 vnet/pg/edit.h
810
Damjan Marion7cd468a2016-12-19 23:05:39 +0100811########################################
812# virtio
813########################################
814
815libvnet_la_SOURCES += \
816 vnet/devices/virtio/vhost-user.c \
817 vnet/devices/virtio/vhost_user_api.c
818
819nobase_include_HEADERS += \
820 vnet/devices/virtio/vhost-user.h \
821 vnet/devices/virtio/vhost_user.api.h
822
823API_FILES += vnet/devices/virtio/vhost_user.api
824
825########################################
826# ssvm ethernet
827########################################
828libvnet_la_SOURCES += \
829 vnet/devices/ssvm/ssvm_eth.c \
830 vnet/devices/ssvm/node.c
831
832nobase_include_HEADERS += \
833 vnet/devices/ssvm/ssvm_eth.h
834
835########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500836# session managmeent
837########################################
838
839libvnet_la_SOURCES += \
840 vnet/session/session.c \
Florin Coras04e53442017-07-16 17:12:15 -0700841 vnet/session/session_lookup.c \
842 vnet/session/session_node.c \
843 vnet/session/transport_interface.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500844 vnet/session/application.c \
845 vnet/session/session_cli.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500846 vnet/session/application_interface.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700847 vnet/session/segment_manager.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500848 vnet/session/session_api.c
849
850nobase_include_HEADERS += \
851 vnet/session/session.h \
Florin Coras04e53442017-07-16 17:12:15 -0700852 vnet/session/stream_session.h \
853 vnet/session/session_lookup.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500854 vnet/session/application.h \
855 vnet/session/transport.h \
Florin Coras04e53442017-07-16 17:12:15 -0700856 vnet/session/transport_interface.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800857 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800858 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700859 vnet/session/segment_manager.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800860 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500861
862API_FILES += vnet/session/session.api
863
864########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100865# Linux packet interface
866########################################
867
868libvnet_la_SOURCES += \
869 vnet/devices/af_packet/af_packet.c \
870 vnet/devices/af_packet/device.c \
871 vnet/devices/af_packet/node.c \
872 vnet/devices/af_packet/cli.c \
873 vnet/devices/af_packet/af_packet_api.c
874
875nobase_include_HEADERS += \
876 vnet/devices/af_packet/af_packet.h \
877 vnet/devices/af_packet/af_packet.api.h
878
879API_FILES += vnet/devices/af_packet/af_packet.api
880
881########################################
882# NETMAP interface
883########################################
884
885libvnet_la_SOURCES += \
886 vnet/devices/netmap/netmap.c \
887 vnet/devices/netmap/device.c \
888 vnet/devices/netmap/node.c \
889 vnet/devices/netmap/cli.c \
890 vnet/devices/netmap/netmap_api.c
891
892nobase_include_HEADERS += \
893 vnet/devices/netmap/netmap.h \
894 vnet/devices/netmap/netmap.api.h
895
896API_FILES += vnet/devices/netmap/netmap.api
897
898########################################
899# Driver feature graph arc support
900########################################
901
902libvnet_la_SOURCES += \
903 vnet/feature/feature.c \
904 vnet/feature/registration.c
905
906nobase_include_HEADERS += \
907 vnet/feature/feature.h
908
909########################################
910# Unix kernel related
911########################################
912
913# FIXME: vnet/unix/hgshm.c
914
915libvnet_la_SOURCES += \
916 vnet/unix/gdb_funcs.c \
917 vnet/unix/pcap.c \
918 vnet/unix/tap_api.c \
919 vnet/unix/tapcli.c \
920 vnet/unix/tuntap.c
921
922nobase_include_HEADERS += \
923 vnet/unix/pcap.h \
924 vnet/unix/tuntap.h \
925 vnet/unix/tap.api.h \
926 vnet/unix/tapcli.h
927
928API_FILES += vnet/unix/tap.api
929
930########################################
931# FIB
932########################################
933
934libvnet_la_SOURCES += \
935 vnet/fib/fib.c \
936 vnet/fib/fib_test.c \
937 vnet/fib/ip4_fib.c \
938 vnet/fib/ip6_fib.c \
939 vnet/fib/mpls_fib.c \
940 vnet/fib/fib_table.c \
941 vnet/fib/fib_walk.c \
942 vnet/fib/fib_types.c \
943 vnet/fib/fib_node.c \
944 vnet/fib/fib_node_list.c \
945 vnet/fib/fib_entry.c \
946 vnet/fib/fib_entry_src.c \
947 vnet/fib/fib_entry_src_rr.c \
948 vnet/fib/fib_entry_src_interface.c \
949 vnet/fib/fib_entry_src_default_route.c \
950 vnet/fib/fib_entry_src_special.c \
951 vnet/fib/fib_entry_src_api.c \
952 vnet/fib/fib_entry_src_adj.c \
953 vnet/fib/fib_entry_src_mpls.c \
954 vnet/fib/fib_entry_src_lisp.c \
955 vnet/fib/fib_entry_cover.c \
956 vnet/fib/fib_entry_delegate.c \
957 vnet/fib/fib_path_list.c \
958 vnet/fib/fib_path.c \
959 vnet/fib/fib_path_ext.c \
960 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700961 vnet/fib/fib_attached_export.c \
962 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100963
964nobase_include_HEADERS += \
965 vnet/fib/fib.h \
966 vnet/fib/fib_api.h \
967 vnet/fib/ip4_fib.h \
968 vnet/fib/ip6_fib.h \
969 vnet/fib/fib_types.h \
970 vnet/fib/fib_table.h \
971 vnet/fib/fib_node.h \
972 vnet/fib/fib_node_list.h \
973 vnet/fib/fib_entry.h \
974 vnet/fib/fib_entry_delegate.h
975
976########################################
977# ADJ
978########################################
979
980libvnet_la_SOURCES += \
981 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100982 vnet/adj/adj_glean.c \
983 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000984 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100985 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800986 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800987 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700988 vnet/adj/rewrite.c \
989 vnet/adj/adj_bfd.c \
990 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100991
992nobase_include_HEADERS += \
993 vnet/adj/adj.h \
994 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100995 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800996 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800997 vnet/adj/adj_nbr.h \
998 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100999
1000########################################
1001# Data-Plane Objects
1002########################################
1003
1004libvnet_la_SOURCES += \
1005 vnet/dpo/dpo.c \
1006 vnet/dpo/drop_dpo.c \
1007 vnet/dpo/ip_null_dpo.c \
1008 vnet/dpo/punt_dpo.c \
1009 vnet/dpo/receive_dpo.c \
1010 vnet/dpo/load_balance.c \
1011 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001012 vnet/dpo/lookup_dpo.c \
1013 vnet/dpo/classify_dpo.c \
1014 vnet/dpo/replicate_dpo.c \
Neale Ranns43161a82017-08-12 02:12:00 -07001015 vnet/dpo/interface_rx_dpo.c \
1016 vnet/dpo/interface_tx_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -08001017 vnet/dpo/mpls_disposition.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001018 vnet/dpo/mpls_label_dpo.c
1019
1020nobase_include_HEADERS += \
1021 vnet/dpo/load_balance.h \
1022 vnet/dpo/drop_dpo.h \
1023 vnet/dpo/lookup_dpo.h \
1024 vnet/dpo/punt_dpo.h \
1025 vnet/dpo/classify_dpo.h \
1026 vnet/dpo/receive_dpo.h \
1027 vnet/dpo/ip_null_dpo.h \
1028 vnet/dpo/dpo.h
1029
1030########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001031# Multicast FIB
1032########################################
1033
1034libvnet_la_SOURCES += \
1035 vnet/mfib/mfib_test.c \
1036 vnet/mfib/mfib_forward.c \
1037 vnet/mfib/ip4_mfib.c \
1038 vnet/mfib/ip6_mfib.c \
1039 vnet/mfib/mfib_types.c \
1040 vnet/mfib/mfib_signal.c \
1041 vnet/mfib/mfib_itf.c \
1042 vnet/mfib/mfib_entry.c \
1043 vnet/mfib/mfib_table.c
1044
1045nobase_include_HEADERS += \
1046 vnet/mfib/ip4_mfib.h \
1047 vnet/mfib/mfib_types.h \
1048 vnet/mfib/mfib_table.h
1049
1050########################################
1051# Utilities
1052########################################
1053
1054libvnet_la_SOURCES += \
1055 vnet/util/radix.c
1056
1057########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001058# Plugin client library
1059########################################
1060
Damjan Marion7cd468a2016-12-19 23:05:39 +01001061nobase_include_HEADERS += \
1062 vnet/plugin/plugin.h
1063
Damjan Marion7cd468a2016-12-19 23:05:39 +01001064pcap2pg_SOURCES = \
1065 vnet/unix/pcap2pg.c \
1066 vnet/unix/pcap.h
1067
1068pcap2pg_LDFLAGS = -static
1069pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1070
1071noinst_PROGRAMS += pcap2pg
1072
1073# vi:syntax=automake