blob: ede0376de1efd3f37b1c023aa6f5ed8959955670 [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 += \
469 vnet/tcp/tcp_format.c \
470 vnet/tcp/tcp_pg.c \
471 vnet/tcp/tcp_syn_filter4.c \
472 vnet/tcp/tcp_output.c \
473 vnet/tcp/tcp_input.c \
474 vnet/tcp/tcp_newreno.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700475 vnet/tcp/builtin_client.c \
Florin Corase04c2992017-03-01 08:17:34 -0800476 vnet/tcp/builtin_server.c \
Dave Barach1015a1e2017-05-08 19:15:03 -0400477 vnet/tcp/builtin_http_server.c \
Dave Barach52851e62017-08-07 09:35:25 -0400478 vnet/tcp/builtin_proxy.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700479 vnet/tcp/tcp_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500480 vnet/tcp/tcp.c
481
482nobase_include_HEADERS += \
483 vnet/tcp/tcp_packet.h \
484 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800485 vnet/tcp/tcp_debug.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500486 vnet/tcp/tcp.h
487
488########################################
489# Layer 4 protocol: udp
490########################################
491libvnet_la_SOURCES += \
492 vnet/udp/udp.c \
493 vnet/udp/udp_input.c \
494 vnet/udp/builtin_server.c \
495 vnet/udp/udp_format.c \
496 vnet/udp/udp_local.c \
497 vnet/udp/udp_pg.c
498
499nobase_include_HEADERS += \
500 vnet/udp/udp_error.def \
501 vnet/udp/udp.h \
502 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100503
504########################################
505# Tunnel protocol: gre
506########################################
507libvnet_la_SOURCES += \
508 vnet/gre/gre.c \
509 vnet/gre/node.c \
510 vnet/gre/interface.c \
511 vnet/gre/pg.c \
512 vnet/gre/gre_api.c
513
514nobase_include_HEADERS += \
515 vnet/gre/gre.h \
516 vnet/gre/packet.h \
517 vnet/gre/error.def \
518 vnet/gre/gre.api.h
519
520API_FILES += vnet/gre/gre.api
521
522########################################
523# Tunnel protocol: l2tpv3
524########################################
525libvnet_la_SOURCES += \
526 vnet/l2tp/l2tp.c \
527 vnet/l2tp/encap.c \
528 vnet/l2tp/decap.c \
529 vnet/l2tp/pg.c \
530 vnet/l2tp/l2tp_api.c
531
532nobase_include_HEADERS += \
533 vnet/l2tp/l2tp.h \
534 vnet/l2tp/packet.h \
535 vnet/l2tp/l2tp.api.h
536
537API_FILES += vnet/l2tp/l2tp.api
538
539########################################
540# Tunnel protocol: gre+mpls
541########################################
542libvnet_la_SOURCES += \
543 vnet/mpls/mpls.c \
544 vnet/mpls/mpls_lookup.c \
545 vnet/mpls/mpls_output.c \
546 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400547 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100548 vnet/mpls/interface.c \
549 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100550 vnet/mpls/pg.c \
551 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100552
553nobase_include_HEADERS += \
554 vnet/mpls/mpls.h \
555 vnet/mpls/mpls_types.h \
556 vnet/mpls/mpls_tunnel.h \
557 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100558 vnet/mpls/error.def \
559 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100560
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100561API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100562
563########################################
564# Tunnel protocol: vxlan-gpe
565########################################
566
567libvnet_la_SOURCES += \
568 vnet/vxlan-gpe/vxlan_gpe.c \
569 vnet/vxlan-gpe/encap.c \
570 vnet/vxlan-gpe/decap.c \
571 vnet/vxlan-gpe/vxlan_gpe_api.c
572
573nobase_include_HEADERS += \
574 vnet/vxlan-gpe/vxlan_gpe.h \
575 vnet/vxlan-gpe/vxlan_gpe_packet.h \
576 vnet/vxlan-gpe/vxlan_gpe_error.def \
577 vnet/vxlan-gpe/vxlan_gpe.api.h
578
579API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
580
581########################################
582# Tunnel protocol: ipsec+gre
583########################################
584libvnet_la_SOURCES += \
585 vnet/ipsec-gre/ipsec_gre.c \
586 vnet/ipsec-gre/node.c \
587 vnet/ipsec-gre/interface.c \
588 vnet/ipsec-gre/ipsec_gre_api.c
589
590nobase_include_HEADERS += \
591 vnet/ipsec-gre/ipsec_gre.h \
592 vnet/ipsec-gre/error.def \
593 vnet/ipsec-gre/ipsec_gre.api.h
594
595API_FILES += vnet/ipsec-gre/ipsec_gre.api
596
597########################################
598# LISP control plane: lisp-cp
599########################################
600
601libvnet_la_SOURCES += \
602 vnet/lisp-cp/lisp_types.c \
603 vnet/lisp-cp/lisp_cp_dpo.c \
604 vnet/lisp-cp/control.c \
605 vnet/lisp-cp/gid_dictionary.c \
606 vnet/lisp-cp/lisp_msg_serdes.c \
607 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100608 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800609 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100610 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100611 vnet/lisp-cp/lisp_api.c
612
613nobase_include_HEADERS += \
614 vnet/lisp-cp/lisp_types.h \
615 vnet/lisp-cp/packets.h \
616 vnet/lisp-cp/gid_dictionary.h \
617 vnet/lisp-cp/lisp_cp_messages.h \
618 vnet/lisp-cp/lisp_msg_serdes.h \
619 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100620 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100621 vnet/lisp-cp/lisp.api.h
622
623API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100624API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100625
626if ENABLE_TESTS
627LDS = \
628 libvppinfra.la \
629 libvnet.la \
630 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100631 libsvm.la \
632 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100633 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100634 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100635
636TESTS += test_cp_serdes test_lisp_types
637
638test_cp_serdes_SOURCES = \
639 tests/vnet/lisp-cp/test_cp_serdes.c \
640 vnet/lisp-cp/lisp_msg_serdes.c \
641 vnet/lisp-cp/lisp_types.c \
642 vnet/lisp-cp/packets.c \
643 vnet/ip/ip_checksum.c
644
645test_lisp_types_SOURCES = \
646 tests/vnet/lisp-cp/test_lisp_types.c \
647 vnet/lisp-cp/lisp_types.c
648
649test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
650test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
651
Damjan Marionc74a86a2017-01-16 14:00:03 +0100652test_cp_serdes_LDADD = $(LDS)
653test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100654endif
655
656########################################
657# Tunnel protocol: lisp-gpe
658########################################
659
660libvnet_la_SOURCES += \
661 vnet/lisp-gpe/lisp_gpe.c \
662 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
663 vnet/lisp-gpe/lisp_gpe_adjacency.c \
664 vnet/lisp-gpe/lisp_gpe_tunnel.c \
665 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
666 vnet/lisp-gpe/lisp_gpe_tenant.c \
667 vnet/lisp-gpe/interface.c \
668 vnet/lisp-gpe/decap.c \
669 vnet/lisp-gpe/lisp_gpe_api.c
670
671nobase_include_HEADERS += \
672 vnet/lisp-gpe/lisp_gpe.h \
673 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
674 vnet/lisp-gpe/lisp_gpe_tenant.h \
675 vnet/lisp-gpe/lisp_gpe_packet.h \
676 vnet/lisp-gpe/lisp_gpe_error.def \
677 vnet/lisp-gpe/lisp_gpe.api.h
678
679API_FILES += vnet/lisp-gpe/lisp_gpe.api
680
Damjan Marion7cd468a2016-12-19 23:05:39 +0100681########################################
682# DHCP client
683########################################
684libvnet_la_SOURCES += \
685 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100686 vnet/dhcp/client.h \
687 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100688
689nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800690 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100691 vnet/dhcp/dhcp.api.h
692
693API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100694
695########################################
696# DHCP proxy
697########################################
698libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800699 vnet/dhcp/dhcp6_proxy_node.c \
700 vnet/dhcp/dhcp4_proxy_node.c \
701 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100702
703nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800704 vnet/dhcp/dhcp4_packet.h \
705 vnet/dhcp/dhcp6_packet.h \
706 vnet/dhcp/dhcp_proxy.h \
707 vnet/dhcp/dhcp6_proxy_error.def \
708 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100709
710########################################
711# ipv6 segment routing
712########################################
713
Damjan Marion7cd468a2016-12-19 23:05:39 +0100714libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200715 vnet/srv6/sr.c \
716 vnet/srv6/sr_localsid.c \
717 vnet/srv6/sr_policy_rewrite.c \
718 vnet/srv6/sr_steering.c \
719 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100720
721nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200722 vnet/srv6/sr_packet.h \
723 vnet/srv6/sr.h \
724 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100725
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200726API_FILES += vnet/srv6/sr.api
727
728########################################
729# mpls segment routing
730########################################
731
732libvnet_la_SOURCES += \
733 vnet/srmpls/sr_mpls_policy.c \
734 vnet/srmpls/sr_mpls_steering.c
735
736
737nobase_include_HEADERS += \
738 vnet/srmpls/sr.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100739
740########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100741# IPFIX / netflow v10
742########################################
743libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100744 vnet/flow/flow_report.c \
745 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100746
747nobase_include_HEADERS += \
748 vnet/flow/flow_report.h \
749 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100750 vnet/flow/ipfix_packet.h \
751 vnet/flow/flow.api.h
752
753API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100754
755########################################
756# IPFIX classify code
757########################################
758
759libvnet_la_SOURCES += \
760 vnet/flow/flow_report_classify.c
761
762nobase_include_HEADERS += \
763 vnet/flow/flow_report_classify.h
764
765########################################
766# lawful intercept
767########################################
768
769libvnet_la_SOURCES += \
770 vnet/lawful-intercept/lawful_intercept.c \
771 vnet/lawful-intercept/node.c
772
773nobase_include_HEADERS += \
774 vnet/lawful-intercept/lawful_intercept.h
775
776########################################
777# SPAN (port mirroring)
778########################################
779
780libvnet_la_SOURCES += \
781 vnet/span/span_api.c \
782 vnet/span/span.c \
783 vnet/span/node.c
784
785nobase_include_HEADERS += \
786 vnet/span/span.api.h \
787 vnet/span/span.h
788
789API_FILES += vnet/span/span.api
790
791########################################
792# Packet generator
793########################################
794
795libvnet_la_SOURCES += \
796 vnet/pg/cli.c \
797 vnet/pg/edit.c \
798 vnet/pg/init.c \
799 vnet/pg/input.c \
800 vnet/pg/output.c \
801 vnet/pg/stream.c
802
803nobase_include_HEADERS += \
804 vnet/pg/pg.h \
805 vnet/pg/edit.h
806
Damjan Marion7cd468a2016-12-19 23:05:39 +0100807########################################
808# virtio
809########################################
810
811libvnet_la_SOURCES += \
812 vnet/devices/virtio/vhost-user.c \
813 vnet/devices/virtio/vhost_user_api.c
814
815nobase_include_HEADERS += \
816 vnet/devices/virtio/vhost-user.h \
817 vnet/devices/virtio/vhost_user.api.h
818
819API_FILES += vnet/devices/virtio/vhost_user.api
820
821########################################
822# ssvm ethernet
823########################################
824libvnet_la_SOURCES += \
825 vnet/devices/ssvm/ssvm_eth.c \
826 vnet/devices/ssvm/node.c
827
828nobase_include_HEADERS += \
829 vnet/devices/ssvm/ssvm_eth.h
830
831########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500832# session managmeent
833########################################
834
835libvnet_la_SOURCES += \
836 vnet/session/session.c \
Florin Coras04e53442017-07-16 17:12:15 -0700837 vnet/session/session_lookup.c \
838 vnet/session/session_node.c \
839 vnet/session/transport_interface.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500840 vnet/session/application.c \
841 vnet/session/session_cli.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500842 vnet/session/application_interface.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700843 vnet/session/segment_manager.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500844 vnet/session/session_api.c
845
846nobase_include_HEADERS += \
847 vnet/session/session.h \
Florin Coras04e53442017-07-16 17:12:15 -0700848 vnet/session/stream_session.h \
849 vnet/session/session_lookup.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500850 vnet/session/application.h \
851 vnet/session/transport.h \
Florin Coras04e53442017-07-16 17:12:15 -0700852 vnet/session/transport_interface.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800853 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800854 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700855 vnet/session/segment_manager.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800856 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500857
858API_FILES += vnet/session/session.api
859
860########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100861# Linux packet interface
862########################################
863
864libvnet_la_SOURCES += \
865 vnet/devices/af_packet/af_packet.c \
866 vnet/devices/af_packet/device.c \
867 vnet/devices/af_packet/node.c \
868 vnet/devices/af_packet/cli.c \
869 vnet/devices/af_packet/af_packet_api.c
870
871nobase_include_HEADERS += \
872 vnet/devices/af_packet/af_packet.h \
873 vnet/devices/af_packet/af_packet.api.h
874
875API_FILES += vnet/devices/af_packet/af_packet.api
876
877########################################
878# NETMAP interface
879########################################
880
881libvnet_la_SOURCES += \
882 vnet/devices/netmap/netmap.c \
883 vnet/devices/netmap/device.c \
884 vnet/devices/netmap/node.c \
885 vnet/devices/netmap/cli.c \
886 vnet/devices/netmap/netmap_api.c
887
888nobase_include_HEADERS += \
889 vnet/devices/netmap/netmap.h \
890 vnet/devices/netmap/netmap.api.h
891
892API_FILES += vnet/devices/netmap/netmap.api
893
894########################################
895# Driver feature graph arc support
896########################################
897
898libvnet_la_SOURCES += \
899 vnet/feature/feature.c \
900 vnet/feature/registration.c
901
902nobase_include_HEADERS += \
903 vnet/feature/feature.h
904
905########################################
906# Unix kernel related
907########################################
908
909# FIXME: vnet/unix/hgshm.c
910
911libvnet_la_SOURCES += \
912 vnet/unix/gdb_funcs.c \
913 vnet/unix/pcap.c \
914 vnet/unix/tap_api.c \
915 vnet/unix/tapcli.c \
916 vnet/unix/tuntap.c
917
918nobase_include_HEADERS += \
919 vnet/unix/pcap.h \
920 vnet/unix/tuntap.h \
921 vnet/unix/tap.api.h \
922 vnet/unix/tapcli.h
923
924API_FILES += vnet/unix/tap.api
925
926########################################
927# FIB
928########################################
929
930libvnet_la_SOURCES += \
931 vnet/fib/fib.c \
932 vnet/fib/fib_test.c \
933 vnet/fib/ip4_fib.c \
934 vnet/fib/ip6_fib.c \
935 vnet/fib/mpls_fib.c \
936 vnet/fib/fib_table.c \
937 vnet/fib/fib_walk.c \
938 vnet/fib/fib_types.c \
939 vnet/fib/fib_node.c \
940 vnet/fib/fib_node_list.c \
941 vnet/fib/fib_entry.c \
942 vnet/fib/fib_entry_src.c \
943 vnet/fib/fib_entry_src_rr.c \
944 vnet/fib/fib_entry_src_interface.c \
945 vnet/fib/fib_entry_src_default_route.c \
946 vnet/fib/fib_entry_src_special.c \
947 vnet/fib/fib_entry_src_api.c \
948 vnet/fib/fib_entry_src_adj.c \
949 vnet/fib/fib_entry_src_mpls.c \
950 vnet/fib/fib_entry_src_lisp.c \
951 vnet/fib/fib_entry_cover.c \
952 vnet/fib/fib_entry_delegate.c \
953 vnet/fib/fib_path_list.c \
954 vnet/fib/fib_path.c \
955 vnet/fib/fib_path_ext.c \
956 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700957 vnet/fib/fib_attached_export.c \
958 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100959
960nobase_include_HEADERS += \
961 vnet/fib/fib.h \
962 vnet/fib/fib_api.h \
963 vnet/fib/ip4_fib.h \
964 vnet/fib/ip6_fib.h \
965 vnet/fib/fib_types.h \
966 vnet/fib/fib_table.h \
967 vnet/fib/fib_node.h \
968 vnet/fib/fib_node_list.h \
969 vnet/fib/fib_entry.h \
970 vnet/fib/fib_entry_delegate.h
971
972########################################
973# ADJ
974########################################
975
976libvnet_la_SOURCES += \
977 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100978 vnet/adj/adj_glean.c \
979 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000980 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100981 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800982 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800983 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700984 vnet/adj/rewrite.c \
985 vnet/adj/adj_bfd.c \
986 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100987
988nobase_include_HEADERS += \
989 vnet/adj/adj.h \
990 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100991 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800992 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800993 vnet/adj/adj_nbr.h \
994 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100995
996########################################
997# Data-Plane Objects
998########################################
999
1000libvnet_la_SOURCES += \
1001 vnet/dpo/dpo.c \
1002 vnet/dpo/drop_dpo.c \
1003 vnet/dpo/ip_null_dpo.c \
1004 vnet/dpo/punt_dpo.c \
1005 vnet/dpo/receive_dpo.c \
1006 vnet/dpo/load_balance.c \
1007 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001008 vnet/dpo/lookup_dpo.c \
1009 vnet/dpo/classify_dpo.c \
1010 vnet/dpo/replicate_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -08001011 vnet/dpo/interface_dpo.c \
1012 vnet/dpo/mpls_disposition.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001013 vnet/dpo/mpls_label_dpo.c
1014
1015nobase_include_HEADERS += \
1016 vnet/dpo/load_balance.h \
1017 vnet/dpo/drop_dpo.h \
1018 vnet/dpo/lookup_dpo.h \
1019 vnet/dpo/punt_dpo.h \
1020 vnet/dpo/classify_dpo.h \
1021 vnet/dpo/receive_dpo.h \
1022 vnet/dpo/ip_null_dpo.h \
1023 vnet/dpo/dpo.h
1024
1025########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001026# Multicast FIB
1027########################################
1028
1029libvnet_la_SOURCES += \
1030 vnet/mfib/mfib_test.c \
1031 vnet/mfib/mfib_forward.c \
1032 vnet/mfib/ip4_mfib.c \
1033 vnet/mfib/ip6_mfib.c \
1034 vnet/mfib/mfib_types.c \
1035 vnet/mfib/mfib_signal.c \
1036 vnet/mfib/mfib_itf.c \
1037 vnet/mfib/mfib_entry.c \
1038 vnet/mfib/mfib_table.c
1039
1040nobase_include_HEADERS += \
1041 vnet/mfib/ip4_mfib.h \
1042 vnet/mfib/mfib_types.h \
1043 vnet/mfib/mfib_table.h
1044
1045########################################
1046# Utilities
1047########################################
1048
1049libvnet_la_SOURCES += \
1050 vnet/util/radix.c
1051
1052########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001053# Plugin client library
1054########################################
1055
Damjan Marion7cd468a2016-12-19 23:05:39 +01001056nobase_include_HEADERS += \
1057 vnet/plugin/plugin.h
1058
Damjan Marion7cd468a2016-12-19 23:05:39 +01001059pcap2pg_SOURCES = \
1060 vnet/unix/pcap2pg.c \
1061 vnet/unix/pcap.h
1062
1063pcap2pg_LDFLAGS = -static
1064pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1065
1066noinst_PROGRAMS += pcap2pg
1067
1068# vi:syntax=automake