blob: 182ec1f40479a89359182e4e66a9af6806b956df [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 \
Dave Barach68b0fb02017-02-28 15:15:56 -0500487 vnet/tcp/tcp.h
488
Dave Barach3bbcfab2017-08-15 19:03:44 -0400489API_FILES += vnet/tcp/tcp.api
490
Dave Barach68b0fb02017-02-28 15:15:56 -0500491########################################
492# Layer 4 protocol: udp
493########################################
494libvnet_la_SOURCES += \
495 vnet/udp/udp.c \
496 vnet/udp/udp_input.c \
497 vnet/udp/builtin_server.c \
498 vnet/udp/udp_format.c \
499 vnet/udp/udp_local.c \
500 vnet/udp/udp_pg.c
501
502nobase_include_HEADERS += \
503 vnet/udp/udp_error.def \
504 vnet/udp/udp.h \
505 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100506
507########################################
508# Tunnel protocol: gre
509########################################
510libvnet_la_SOURCES += \
511 vnet/gre/gre.c \
512 vnet/gre/node.c \
513 vnet/gre/interface.c \
514 vnet/gre/pg.c \
515 vnet/gre/gre_api.c
516
517nobase_include_HEADERS += \
518 vnet/gre/gre.h \
519 vnet/gre/packet.h \
520 vnet/gre/error.def \
521 vnet/gre/gre.api.h
522
523API_FILES += vnet/gre/gre.api
524
525########################################
526# Tunnel protocol: l2tpv3
527########################################
528libvnet_la_SOURCES += \
529 vnet/l2tp/l2tp.c \
530 vnet/l2tp/encap.c \
531 vnet/l2tp/decap.c \
532 vnet/l2tp/pg.c \
533 vnet/l2tp/l2tp_api.c
534
535nobase_include_HEADERS += \
536 vnet/l2tp/l2tp.h \
537 vnet/l2tp/packet.h \
538 vnet/l2tp/l2tp.api.h
539
540API_FILES += vnet/l2tp/l2tp.api
541
542########################################
543# Tunnel protocol: gre+mpls
544########################################
545libvnet_la_SOURCES += \
546 vnet/mpls/mpls.c \
547 vnet/mpls/mpls_lookup.c \
548 vnet/mpls/mpls_output.c \
549 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400550 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100551 vnet/mpls/interface.c \
552 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100553 vnet/mpls/pg.c \
554 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100555
556nobase_include_HEADERS += \
557 vnet/mpls/mpls.h \
558 vnet/mpls/mpls_types.h \
559 vnet/mpls/mpls_tunnel.h \
560 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100561 vnet/mpls/error.def \
562 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100563
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100564API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100565
566########################################
567# Tunnel protocol: vxlan-gpe
568########################################
569
570libvnet_la_SOURCES += \
571 vnet/vxlan-gpe/vxlan_gpe.c \
572 vnet/vxlan-gpe/encap.c \
573 vnet/vxlan-gpe/decap.c \
574 vnet/vxlan-gpe/vxlan_gpe_api.c
575
576nobase_include_HEADERS += \
577 vnet/vxlan-gpe/vxlan_gpe.h \
578 vnet/vxlan-gpe/vxlan_gpe_packet.h \
579 vnet/vxlan-gpe/vxlan_gpe_error.def \
580 vnet/vxlan-gpe/vxlan_gpe.api.h
581
582API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
583
584########################################
585# Tunnel protocol: ipsec+gre
586########################################
587libvnet_la_SOURCES += \
588 vnet/ipsec-gre/ipsec_gre.c \
589 vnet/ipsec-gre/node.c \
590 vnet/ipsec-gre/interface.c \
591 vnet/ipsec-gre/ipsec_gre_api.c
592
593nobase_include_HEADERS += \
594 vnet/ipsec-gre/ipsec_gre.h \
595 vnet/ipsec-gre/error.def \
596 vnet/ipsec-gre/ipsec_gre.api.h
597
598API_FILES += vnet/ipsec-gre/ipsec_gre.api
599
600########################################
601# LISP control plane: lisp-cp
602########################################
603
604libvnet_la_SOURCES += \
605 vnet/lisp-cp/lisp_types.c \
606 vnet/lisp-cp/lisp_cp_dpo.c \
607 vnet/lisp-cp/control.c \
608 vnet/lisp-cp/gid_dictionary.c \
609 vnet/lisp-cp/lisp_msg_serdes.c \
610 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100611 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800612 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100613 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100614 vnet/lisp-cp/lisp_api.c
615
616nobase_include_HEADERS += \
617 vnet/lisp-cp/lisp_types.h \
618 vnet/lisp-cp/packets.h \
619 vnet/lisp-cp/gid_dictionary.h \
620 vnet/lisp-cp/lisp_cp_messages.h \
621 vnet/lisp-cp/lisp_msg_serdes.h \
622 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100623 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100624 vnet/lisp-cp/lisp.api.h
625
626API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100627API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100628
629if ENABLE_TESTS
630LDS = \
631 libvppinfra.la \
632 libvnet.la \
633 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100634 libsvm.la \
635 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100636 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100637 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100638
639TESTS += test_cp_serdes test_lisp_types
640
641test_cp_serdes_SOURCES = \
642 tests/vnet/lisp-cp/test_cp_serdes.c \
643 vnet/lisp-cp/lisp_msg_serdes.c \
644 vnet/lisp-cp/lisp_types.c \
645 vnet/lisp-cp/packets.c \
646 vnet/ip/ip_checksum.c
647
648test_lisp_types_SOURCES = \
649 tests/vnet/lisp-cp/test_lisp_types.c \
650 vnet/lisp-cp/lisp_types.c
651
652test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
653test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
654
Damjan Marionc74a86a2017-01-16 14:00:03 +0100655test_cp_serdes_LDADD = $(LDS)
656test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100657endif
658
659########################################
660# Tunnel protocol: lisp-gpe
661########################################
662
663libvnet_la_SOURCES += \
664 vnet/lisp-gpe/lisp_gpe.c \
665 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
666 vnet/lisp-gpe/lisp_gpe_adjacency.c \
667 vnet/lisp-gpe/lisp_gpe_tunnel.c \
668 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
669 vnet/lisp-gpe/lisp_gpe_tenant.c \
670 vnet/lisp-gpe/interface.c \
671 vnet/lisp-gpe/decap.c \
672 vnet/lisp-gpe/lisp_gpe_api.c
673
674nobase_include_HEADERS += \
675 vnet/lisp-gpe/lisp_gpe.h \
676 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
677 vnet/lisp-gpe/lisp_gpe_tenant.h \
678 vnet/lisp-gpe/lisp_gpe_packet.h \
679 vnet/lisp-gpe/lisp_gpe_error.def \
680 vnet/lisp-gpe/lisp_gpe.api.h
681
682API_FILES += vnet/lisp-gpe/lisp_gpe.api
683
Damjan Marion7cd468a2016-12-19 23:05:39 +0100684########################################
685# DHCP client
686########################################
687libvnet_la_SOURCES += \
688 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100689 vnet/dhcp/client.h \
690 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100691
692nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800693 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100694 vnet/dhcp/dhcp.api.h
695
696API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100697
698########################################
699# DHCP proxy
700########################################
701libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800702 vnet/dhcp/dhcp6_proxy_node.c \
703 vnet/dhcp/dhcp4_proxy_node.c \
704 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100705
706nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800707 vnet/dhcp/dhcp4_packet.h \
708 vnet/dhcp/dhcp6_packet.h \
709 vnet/dhcp/dhcp_proxy.h \
710 vnet/dhcp/dhcp6_proxy_error.def \
711 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100712
713########################################
714# ipv6 segment routing
715########################################
716
Damjan Marion7cd468a2016-12-19 23:05:39 +0100717libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200718 vnet/srv6/sr.c \
719 vnet/srv6/sr_localsid.c \
720 vnet/srv6/sr_policy_rewrite.c \
721 vnet/srv6/sr_steering.c \
722 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100723
724nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200725 vnet/srv6/sr_packet.h \
726 vnet/srv6/sr.h \
727 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100728
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200729API_FILES += vnet/srv6/sr.api
730
731########################################
732# mpls segment routing
733########################################
734
735libvnet_la_SOURCES += \
736 vnet/srmpls/sr_mpls_policy.c \
737 vnet/srmpls/sr_mpls_steering.c
738
739
740nobase_include_HEADERS += \
741 vnet/srmpls/sr.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100742
743########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100744# IPFIX / netflow v10
745########################################
746libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100747 vnet/flow/flow_report.c \
748 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100749
750nobase_include_HEADERS += \
751 vnet/flow/flow_report.h \
752 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100753 vnet/flow/ipfix_packet.h \
754 vnet/flow/flow.api.h
755
756API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100757
758########################################
759# IPFIX classify code
760########################################
761
762libvnet_la_SOURCES += \
763 vnet/flow/flow_report_classify.c
764
765nobase_include_HEADERS += \
766 vnet/flow/flow_report_classify.h
767
768########################################
769# lawful intercept
770########################################
771
772libvnet_la_SOURCES += \
773 vnet/lawful-intercept/lawful_intercept.c \
774 vnet/lawful-intercept/node.c
775
776nobase_include_HEADERS += \
777 vnet/lawful-intercept/lawful_intercept.h
778
779########################################
780# SPAN (port mirroring)
781########################################
782
783libvnet_la_SOURCES += \
784 vnet/span/span_api.c \
785 vnet/span/span.c \
786 vnet/span/node.c
787
788nobase_include_HEADERS += \
789 vnet/span/span.api.h \
790 vnet/span/span.h
791
792API_FILES += vnet/span/span.api
793
794########################################
795# Packet generator
796########################################
797
798libvnet_la_SOURCES += \
799 vnet/pg/cli.c \
800 vnet/pg/edit.c \
801 vnet/pg/init.c \
802 vnet/pg/input.c \
803 vnet/pg/output.c \
804 vnet/pg/stream.c
805
806nobase_include_HEADERS += \
807 vnet/pg/pg.h \
808 vnet/pg/edit.h
809
Damjan Marion7cd468a2016-12-19 23:05:39 +0100810########################################
811# virtio
812########################################
813
814libvnet_la_SOURCES += \
815 vnet/devices/virtio/vhost-user.c \
816 vnet/devices/virtio/vhost_user_api.c
817
818nobase_include_HEADERS += \
819 vnet/devices/virtio/vhost-user.h \
820 vnet/devices/virtio/vhost_user.api.h
821
822API_FILES += vnet/devices/virtio/vhost_user.api
823
824########################################
825# ssvm ethernet
826########################################
827libvnet_la_SOURCES += \
828 vnet/devices/ssvm/ssvm_eth.c \
829 vnet/devices/ssvm/node.c
830
831nobase_include_HEADERS += \
832 vnet/devices/ssvm/ssvm_eth.h
833
834########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500835# session managmeent
836########################################
837
838libvnet_la_SOURCES += \
839 vnet/session/session.c \
Florin Coras04e53442017-07-16 17:12:15 -0700840 vnet/session/session_lookup.c \
841 vnet/session/session_node.c \
842 vnet/session/transport_interface.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500843 vnet/session/application.c \
844 vnet/session/session_cli.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500845 vnet/session/application_interface.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700846 vnet/session/segment_manager.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500847 vnet/session/session_api.c
848
849nobase_include_HEADERS += \
850 vnet/session/session.h \
Florin Coras04e53442017-07-16 17:12:15 -0700851 vnet/session/stream_session.h \
852 vnet/session/session_lookup.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500853 vnet/session/application.h \
854 vnet/session/transport.h \
Florin Coras04e53442017-07-16 17:12:15 -0700855 vnet/session/transport_interface.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800856 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800857 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700858 vnet/session/segment_manager.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800859 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500860
861API_FILES += vnet/session/session.api
862
863########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100864# Linux packet interface
865########################################
866
867libvnet_la_SOURCES += \
868 vnet/devices/af_packet/af_packet.c \
869 vnet/devices/af_packet/device.c \
870 vnet/devices/af_packet/node.c \
871 vnet/devices/af_packet/cli.c \
872 vnet/devices/af_packet/af_packet_api.c
873
874nobase_include_HEADERS += \
875 vnet/devices/af_packet/af_packet.h \
876 vnet/devices/af_packet/af_packet.api.h
877
878API_FILES += vnet/devices/af_packet/af_packet.api
879
880########################################
881# NETMAP interface
882########################################
883
884libvnet_la_SOURCES += \
885 vnet/devices/netmap/netmap.c \
886 vnet/devices/netmap/device.c \
887 vnet/devices/netmap/node.c \
888 vnet/devices/netmap/cli.c \
889 vnet/devices/netmap/netmap_api.c
890
891nobase_include_HEADERS += \
892 vnet/devices/netmap/netmap.h \
893 vnet/devices/netmap/netmap.api.h
894
895API_FILES += vnet/devices/netmap/netmap.api
896
897########################################
898# Driver feature graph arc support
899########################################
900
901libvnet_la_SOURCES += \
902 vnet/feature/feature.c \
903 vnet/feature/registration.c
904
905nobase_include_HEADERS += \
906 vnet/feature/feature.h
907
908########################################
909# Unix kernel related
910########################################
911
912# FIXME: vnet/unix/hgshm.c
913
914libvnet_la_SOURCES += \
915 vnet/unix/gdb_funcs.c \
916 vnet/unix/pcap.c \
917 vnet/unix/tap_api.c \
918 vnet/unix/tapcli.c \
919 vnet/unix/tuntap.c
920
921nobase_include_HEADERS += \
922 vnet/unix/pcap.h \
923 vnet/unix/tuntap.h \
924 vnet/unix/tap.api.h \
925 vnet/unix/tapcli.h
926
927API_FILES += vnet/unix/tap.api
928
929########################################
930# FIB
931########################################
932
933libvnet_la_SOURCES += \
934 vnet/fib/fib.c \
935 vnet/fib/fib_test.c \
936 vnet/fib/ip4_fib.c \
937 vnet/fib/ip6_fib.c \
938 vnet/fib/mpls_fib.c \
939 vnet/fib/fib_table.c \
940 vnet/fib/fib_walk.c \
941 vnet/fib/fib_types.c \
942 vnet/fib/fib_node.c \
943 vnet/fib/fib_node_list.c \
944 vnet/fib/fib_entry.c \
945 vnet/fib/fib_entry_src.c \
946 vnet/fib/fib_entry_src_rr.c \
947 vnet/fib/fib_entry_src_interface.c \
948 vnet/fib/fib_entry_src_default_route.c \
949 vnet/fib/fib_entry_src_special.c \
950 vnet/fib/fib_entry_src_api.c \
951 vnet/fib/fib_entry_src_adj.c \
952 vnet/fib/fib_entry_src_mpls.c \
953 vnet/fib/fib_entry_src_lisp.c \
954 vnet/fib/fib_entry_cover.c \
955 vnet/fib/fib_entry_delegate.c \
956 vnet/fib/fib_path_list.c \
957 vnet/fib/fib_path.c \
958 vnet/fib/fib_path_ext.c \
959 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700960 vnet/fib/fib_attached_export.c \
961 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100962
963nobase_include_HEADERS += \
964 vnet/fib/fib.h \
965 vnet/fib/fib_api.h \
966 vnet/fib/ip4_fib.h \
967 vnet/fib/ip6_fib.h \
968 vnet/fib/fib_types.h \
969 vnet/fib/fib_table.h \
970 vnet/fib/fib_node.h \
971 vnet/fib/fib_node_list.h \
972 vnet/fib/fib_entry.h \
973 vnet/fib/fib_entry_delegate.h
974
975########################################
976# ADJ
977########################################
978
979libvnet_la_SOURCES += \
980 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100981 vnet/adj/adj_glean.c \
982 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000983 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100984 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800985 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800986 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700987 vnet/adj/rewrite.c \
988 vnet/adj/adj_bfd.c \
989 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100990
991nobase_include_HEADERS += \
992 vnet/adj/adj.h \
993 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100994 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800995 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800996 vnet/adj/adj_nbr.h \
997 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100998
999########################################
1000# Data-Plane Objects
1001########################################
1002
1003libvnet_la_SOURCES += \
1004 vnet/dpo/dpo.c \
1005 vnet/dpo/drop_dpo.c \
1006 vnet/dpo/ip_null_dpo.c \
1007 vnet/dpo/punt_dpo.c \
1008 vnet/dpo/receive_dpo.c \
1009 vnet/dpo/load_balance.c \
1010 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001011 vnet/dpo/lookup_dpo.c \
1012 vnet/dpo/classify_dpo.c \
1013 vnet/dpo/replicate_dpo.c \
Neale Ranns43161a82017-08-12 02:12:00 -07001014 vnet/dpo/interface_rx_dpo.c \
1015 vnet/dpo/interface_tx_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -08001016 vnet/dpo/mpls_disposition.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001017 vnet/dpo/mpls_label_dpo.c
1018
1019nobase_include_HEADERS += \
1020 vnet/dpo/load_balance.h \
1021 vnet/dpo/drop_dpo.h \
1022 vnet/dpo/lookup_dpo.h \
1023 vnet/dpo/punt_dpo.h \
1024 vnet/dpo/classify_dpo.h \
1025 vnet/dpo/receive_dpo.h \
1026 vnet/dpo/ip_null_dpo.h \
1027 vnet/dpo/dpo.h
1028
1029########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001030# Multicast FIB
1031########################################
1032
1033libvnet_la_SOURCES += \
1034 vnet/mfib/mfib_test.c \
1035 vnet/mfib/mfib_forward.c \
1036 vnet/mfib/ip4_mfib.c \
1037 vnet/mfib/ip6_mfib.c \
1038 vnet/mfib/mfib_types.c \
1039 vnet/mfib/mfib_signal.c \
1040 vnet/mfib/mfib_itf.c \
1041 vnet/mfib/mfib_entry.c \
1042 vnet/mfib/mfib_table.c
1043
1044nobase_include_HEADERS += \
1045 vnet/mfib/ip4_mfib.h \
1046 vnet/mfib/mfib_types.h \
1047 vnet/mfib/mfib_table.h
1048
1049########################################
1050# Utilities
1051########################################
1052
1053libvnet_la_SOURCES += \
1054 vnet/util/radix.c
1055
1056########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001057# Plugin client library
1058########################################
1059
Damjan Marion7cd468a2016-12-19 23:05:39 +01001060nobase_include_HEADERS += \
1061 vnet/plugin/plugin.h
1062
Damjan Marion7cd468a2016-12-19 23:05:39 +01001063pcap2pg_SOURCES = \
1064 vnet/unix/pcap2pg.c \
1065 vnet/unix/pcap.h
1066
1067pcap2pg_LDFLAGS = -static
1068pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1069
1070noinst_PROGRAMS += pcap2pg
1071
1072# vi:syntax=automake