blob: 78eb481bc052543b3b46e5f2f4b190bde62e5eeb [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
Damjan Marionf3b27462018-05-15 19:51:38 +020015noinst_LTLIBRARIES =
Damjan Marion724f64c2017-01-11 11:11:00 +010016
Damjan Marion7cd468a2016-12-19 23:05:39 +010017libvnet_la_SOURCES =
Damjan Marionc74a86a2017-01-16 14:00:03 +010018libvnet_la_DEPENDENCIES = \
19 libvppinfra.la \
20 libvlib.la \
21 libsvmdb.la \
22 libsvm.la \
Dave Barach654ceaf2017-03-29 16:59:02 -040023 libvlibmemory.la
Damjan Marion812b32d2018-05-28 21:26:47 +020024libvnet_multiversioning_sources =
Damjan Marion7cd468a2016-12-19 23:05:39 +010025
Damjan Marionc3a814b2017-02-28 19:22:22 +010026libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt
Damjan Marion45a00c42017-01-08 15:34:50 +010027
Damjan Mariona9a951f2017-01-16 22:06:10 +010028if WITH_LIBSSL
Damjan Marion45a00c42017-01-08 15:34:50 +010029libvnet_la_LIBADD += -lcrypto
30endif
Damjan Marion7cd468a2016-12-19 23:05:39 +010031
32########################################
33# Generic stuff
34########################################
35libvnet_la_SOURCES += \
Damjan Marionbd846cd2017-11-21 13:12:41 +010036 vnet/buffer.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +010037 vnet/config.c \
38 vnet/devices/devices.c \
Damjan Marion17fdae72017-11-30 20:56:37 +010039 vnet/devices/netlink.c \
Damjan Mariona35cc142018-03-16 01:25:27 +010040 vnet/flow/flow.c \
41 vnet/flow/flow_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +010042 vnet/handoff.c \
43 vnet/interface.c \
44 vnet/interface_api.c \
45 vnet/interface_cli.c \
46 vnet/interface_format.c \
47 vnet/interface_output.c \
Neale Ranns871dc422018-03-29 01:28:09 -070048 vnet/interface_stats.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +010049 vnet/misc.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -080050 vnet/replication.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010051
52nobase_include_HEADERS += \
53 vnet/api_errno.h \
54 vnet/buffer.h \
55 vnet/config.h \
56 vnet/devices/devices.h \
Damjan Marion17fdae72017-11-30 20:56:37 +010057 vnet/devices/netlink.h \
Damjan Mariona35cc142018-03-16 01:25:27 +010058 vnet/flow/flow.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +010059 vnet/global_funcs.h \
60 vnet/handoff.h \
61 vnet/interface.h \
62 vnet/interface.api.h \
63 vnet/interface_funcs.h \
Matus Fabiana774b532017-05-02 03:15:22 -070064 vnet/ip/ip4_to_ip6.h \
65 vnet/ip/ip6_to_ip4.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +010066 vnet/l3_types.h \
67 vnet/pipeline.h \
68 vnet/replication.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +010069 vnet/vnet.h \
70 vnet/vnet_all_api_h.h \
Gabriel Ganne5842c782017-01-30 13:44:04 +010071 vnet/vnet_msg_enum.h \
Hongjun Nibf4be572017-11-13 20:34:06 +080072 vnet/util/radix.h \
73 vnet/util/refcount.h
Damjan Marion7cd468a2016-12-19 23:05:39 +010074
75API_FILES += vnet/interface.api
76
77########################################
78# Policer infra
79########################################
80
81libvnet_la_SOURCES += \
82 vnet/policer/node_funcs.c \
83 vnet/policer/policer.c \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010084 vnet/policer/xlate.c \
85 vnet/policer/policer_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010086
87nobase_include_HEADERS += \
88 vnet/policer/police.h \
89 vnet/policer/policer.h \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010090 vnet/policer/xlate.h \
91 vnet/policer/policer.api.h
92
93API_FILES += vnet/policer/policer.api
Damjan Marion7cd468a2016-12-19 23:05:39 +010094
95########################################
96# Cop - junk filter
97########################################
98
99libvnet_la_SOURCES += \
100 vnet/cop/cop.c \
101 vnet/cop/node1.c \
102 vnet/cop/ip4_whitelist.c \
Pavel Kotucek884cf262017-01-25 08:27:15 +0100103 vnet/cop/ip6_whitelist.c \
104 vnet/cop/cop_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100105
106nobase_include_HEADERS += \
Pavel Kotucek884cf262017-01-25 08:27:15 +0100107 vnet/cop/cop.h \
108 vnet/cop/cop.api.h
109
110API_FILES += vnet/cop/cop.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100111
112########################################
113# Layer 2 protocols go here
114########################################
115
116########################################
117# Layer 2 protocol: Ethernet
118########################################
119libvnet_la_SOURCES += \
120 vnet/ethernet/arp.c \
121 vnet/ethernet/format.c \
122 vnet/ethernet/init.c \
123 vnet/ethernet/interface.c \
124 vnet/ethernet/node.c \
Damjan Marion374e2c52017-03-09 20:38:15 +0100125 vnet/ethernet/pg.c \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200126 vnet/ethernet/sfp.c \
127 vnet/ethernet/p2p_ethernet.c \
Pavel Kotucek15ac81c2017-06-20 14:00:26 +0200128 vnet/ethernet/p2p_ethernet_input.c \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200129 vnet/ethernet/p2p_ethernet_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100130
Damjan Marion812b32d2018-05-28 21:26:47 +0200131libvnet_multiversioning_sources += \
Damjan Marionf3b27462018-05-15 19:51:38 +0200132 vnet/l2/l2_output.c
133
Damjan Marion7cd468a2016-12-19 23:05:39 +0100134nobase_include_HEADERS += \
135 vnet/ethernet/arp_packet.h \
136 vnet/ethernet/error.def \
137 vnet/ethernet/ethernet.h \
138 vnet/ethernet/packet.h \
Damjan Marion374e2c52017-03-09 20:38:15 +0100139 vnet/ethernet/types.def \
Pavel Kotucek6899a302017-06-08 08:46:10 +0200140 vnet/ethernet/sfp.h \
141 vnet/ethernet/p2p_ethernet.api.h \
142 vnet/ethernet/p2p_ethernet.h
143
144API_FILES += vnet/ethernet/p2p_ethernet.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100145
146########################################
147# Layer 2 protocol: Ethernet bridging
148########################################
149libvnet_la_SOURCES += \
150 vnet/l2/feat_bitmap.c \
151 vnet/l2/l2_api.c \
152 vnet/l2/l2_bd.c \
153 vnet/l2/l2_bvi.c \
154 vnet/l2/l2_input_classify.c \
155 vnet/l2/l2_output_classify.c \
156 vnet/l2/l2_efp_filter.c \
157 vnet/l2/l2_fib.c \
158 vnet/l2/l2_flood.c \
159 vnet/l2/l2_fwd.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100160 vnet/l2/l2_input.c \
161 vnet/l2/l2_input_vtr.c \
162 vnet/l2/l2_learn.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100163 vnet/l2/l2_output.c \
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100164 vnet/l2/l2_in_out_acl.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100165 vnet/l2/l2_patch.c \
166 vnet/l2/l2_rw.c \
167 vnet/l2/l2_vtr.c \
168 vnet/l2/l2_xcrw.c
169
170nobase_include_HEADERS += \
171 vnet/l2/feat_bitmap.h \
172 vnet/l2/l2_input.h \
173 vnet/l2/l2_output.h \
174 vnet/l2/l2_vtr.h \
175 vnet/l2/l2_input_vtr.h \
176 vnet/l2/l2_efp_filter.h \
177 vnet/l2/l2_fwd.h \
178 vnet/l2/l2_bd.h \
179 vnet/l2/l2_bvi.h \
180 vnet/l2/l2_flood.h \
181 vnet/l2/l2_fib.h \
182 vnet/l2/l2_rw.h \
183 vnet/l2/l2_xcrw.h \
184 vnet/l2/l2_classify.h \
185 vnet/l2/l2.api.h
186
187API_FILES += vnet/l2/l2.api
188
189########################################
190# Layer 2 protocol: SRP
191########################################
192libvnet_la_SOURCES += \
193 vnet/srp/format.c \
194 vnet/srp/interface.c \
195 vnet/srp/node.c \
196 vnet/srp/pg.c
197
198nobase_include_HEADERS += \
199 vnet/srp/packet.h \
200 vnet/srp/srp.h
201
202########################################
203# Layer 2 protocol: PPP
204########################################
205libvnet_la_SOURCES += \
206 vnet/ppp/node.c \
207 vnet/ppp/pg.c \
208 vnet/ppp/ppp.c
209
210nobase_include_HEADERS += \
211 vnet/ppp/error.def \
212 vnet/ppp/ppp.h \
213 vnet/ppp/packet.h
214
215########################################
216# Layer 2 protocol: HDLC
217########################################
218libvnet_la_SOURCES += \
219 vnet/hdlc/node.c \
220 vnet/hdlc/pg.c \
221 vnet/hdlc/hdlc.c
222
223nobase_include_HEADERS += \
224 vnet/hdlc/error.def \
225 vnet/hdlc/hdlc.h \
226 vnet/hdlc/packet.h
227
228########################################
229# Layer 2 protocol: LLC
230########################################
231libvnet_la_SOURCES += \
232 vnet/llc/llc.c \
233 vnet/llc/node.c \
234 vnet/llc/pg.c
235
236nobase_include_HEADERS += \
237 vnet/llc/llc.h
238
239########################################
240# Layer 2 protocol: SNAP
241########################################
242libvnet_la_SOURCES += \
243 vnet/snap/snap.c \
244 vnet/snap/node.c \
245 vnet/snap/pg.c
246
247nobase_include_HEADERS += \
248 vnet/snap/snap.h
249
250########################################
251# Layer 2 / vxlan
252########################################
253libvnet_la_SOURCES += \
254 vnet/vxlan/vxlan.c \
255 vnet/vxlan/encap.c \
256 vnet/vxlan/decap.c \
257 vnet/vxlan/vxlan_api.c
258
259nobase_include_HEADERS += \
260 vnet/vxlan/vxlan.h \
261 vnet/vxlan/vxlan_packet.h \
262 vnet/vxlan/vxlan_error.def \
263 vnet/vxlan/vxlan.api.h
264
265API_FILES += vnet/vxlan/vxlan.api
266
267########################################
Marco Varleseb598f1d2017-09-19 14:25:28 +0200268# Layer 2 / Geneve
269########################################
270libvnet_la_SOURCES += \
271 vnet/geneve/geneve.c \
272 vnet/geneve/encap.c \
273 vnet/geneve/decap.c \
274 vnet/geneve/geneve_api.c
275
276nobase_include_HEADERS += \
277 vnet/geneve/geneve.h \
278 vnet/geneve/geneve_packet.h \
279 vnet/geneve/geneve_error.def \
280 vnet/geneve/geneve.api.h
281
282API_FILES += vnet/geneve/geneve.api
283
284########################################
Steven9cd2d7a2017-12-20 12:43:01 -0800285# Layer 2 / Bonding
286########################################
287libvnet_la_SOURCES += \
288 vnet/bonding/cli.c \
289 vnet/bonding/node.c \
290 vnet/bonding/device.c \
291 vnet/bonding/bond_api.c
292
293nobase_include_HEADERS += \
294 vnet/bonding/node.h \
295 vnet/bonding/bond.api.h
296
Damjan Marion812b32d2018-05-28 21:26:47 +0200297libvnet_multiversioning_sources += \
Damjan Marion5e5adb32018-05-26 00:50:39 +0200298 vnet/bonding/node.c
299
Steven9cd2d7a2017-12-20 12:43:01 -0800300API_FILES += vnet/bonding/bond.api
301
302########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100303# Layer 2 / LLDP
304########################################
305libvnet_la_SOURCES += \
306 vnet/lldp/lldp_input.c \
307 vnet/lldp/lldp_node.c \
308 vnet/lldp/lldp_output.c \
Steve Shin99a0e602017-07-01 04:16:20 +0000309 vnet/lldp/lldp_cli.c \
310 vnet/lldp/lldp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100311
312nobase_include_HEADERS += \
Steve Shin99a0e602017-07-01 04:16:20 +0000313 vnet/lldp/lldp_protocol.h \
314 vnet/lldp/lldp.h \
315 vnet/lldp/lldp.api.h
316
317API_FILES += vnet/lldp/lldp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100318
319########################################
320# Layer 2/3 "classify"
321########################################
322libvnet_la_SOURCES += \
323 vnet/classify/vnet_classify.c \
324 vnet/classify/ip_classify.c \
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100325 vnet/classify/in_out_acl.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100326 vnet/classify/policer_classify.c \
327 vnet/classify/flow_classify.c \
328 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100329 vnet/classify/vnet_classify.h \
330 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100331
332nobase_include_HEADERS += \
333 vnet/classify/vnet_classify.h \
Andrew Yourtchenko815d7d52018-02-07 11:37:02 +0100334 vnet/classify/in_out_acl.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100335 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100336 vnet/classify/flow_classify.h \
337 vnet/classify/classify.api.h
338
339API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100340
341########################################
342# Layer 3 protocols go here
343########################################
344
345########################################
346# Layer 3 protocol: IP v4/v6
347########################################
348libvnet_la_SOURCES += \
349 vnet/ip/format.c \
350 vnet/ip/icmp4.c \
351 vnet/ip/icmp6.c \
352 vnet/ip/ip46_cli.c \
353 vnet/ip/ip4_format.c \
354 vnet/ip/ip4_forward.c \
Neale Rannsd91c1db2017-07-31 02:30:50 -0700355 vnet/ip/ip4_punt_drop.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100356 vnet/ip/ip4_input.c \
357 vnet/ip/ip4_mtrie.c \
358 vnet/ip/ip4_pg.c \
359 vnet/ip/ip4_source_and_port_range_check.c \
360 vnet/ip/ip4_source_check.c \
Klement Sekera75e7d132017-09-20 08:26:30 +0200361 vnet/ip/ip4_reassembly.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100362 vnet/ip/ip6_format.c \
363 vnet/ip/ip6_forward.c \
Neale Ranns53da2212018-02-24 02:11:19 -0800364 vnet/ip/ip6_ll_table.c \
365 vnet/ip/ip6_ll_types.c \
Neale Rannsd91c1db2017-07-31 02:30:50 -0700366 vnet/ip/ip6_punt_drop.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100367 vnet/ip/ip6_hop_by_hop.c \
368 vnet/ip/ip6_input.c \
369 vnet/ip/ip6_neighbor.c \
370 vnet/ip/ip6_pg.c \
Klement Sekera75e7d132017-09-20 08:26:30 +0200371 vnet/ip/ip6_reassembly.c \
Juraj Slobodac0374232018-02-01 15:18:49 +0100372 vnet/ip/rd_cp.c \
John Lo7f358b32018-04-28 01:19:24 -0400373 vnet/ip/ip_neighbor.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100374 vnet/ip/ip_api.c \
375 vnet/ip/ip_checksum.c \
376 vnet/ip/ip_frag.c \
Florin Corascea194d2017-10-02 00:18:51 -0700377 vnet/ip/ip.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100378 vnet/ip/ip_init.c \
Neale Ranns039cbfe2018-02-27 03:45:38 -0800379 vnet/ip/ip_in_out_acl.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100380 vnet/ip/lookup.c \
381 vnet/ip/ping.c \
Neale Rannsb8d44812017-11-10 06:53:54 -0800382 vnet/ip/punt_api.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500383 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100384
385nobase_include_HEADERS += \
386 vnet/ip/format.h \
387 vnet/ip/icmp46_packet.h \
388 vnet/ip/icmp4.h \
389 vnet/ip/icmp6.h \
390 vnet/ip/igmp_packet.h \
391 vnet/ip/ip.api.h \
Juraj Slobodac0374232018-02-01 15:18:49 +0100392 vnet/ip/rd_cp.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100393 vnet/ip/ip4_error.h \
394 vnet/ip/ip4.h \
395 vnet/ip/ip4_mtrie.h \
396 vnet/ip/ip4_packet.h \
397 vnet/ip/ip6_error.h \
398 vnet/ip/ip6.h \
399 vnet/ip/ip6_hop_by_hop.h \
400 vnet/ip/ip6_hop_by_hop_packet.h \
401 vnet/ip/ip6_packet.h \
402 vnet/ip/ip6_neighbor.h \
403 vnet/ip/ip.h \
404 vnet/ip/ip_packet.h \
405 vnet/ip/ip_source_and_port_range_check.h \
John Lo7f358b32018-04-28 01:19:24 -0400406 vnet/ip/ip_neighbor.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100407 vnet/ip/lookup.h \
408 vnet/ip/ports.def \
409 vnet/ip/protocols.def \
410 vnet/ip/punt_error.def \
Neale Rannsb8d44812017-11-10 06:53:54 -0800411 vnet/ip/punt.api.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500412 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100413
Neale Rannsb8d44812017-11-10 06:53:54 -0800414API_FILES += \
415 vnet/ip/ip.api \
Juraj Slobodac0374232018-02-01 15:18:49 +0100416 vnet/ip/rd_cp.api \
Neale Rannsb8d44812017-11-10 06:53:54 -0800417 vnet/ip/punt.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100418
Damjan Marion812b32d2018-05-28 21:26:47 +0200419libvnet_multiversioning_sources += \
Damjan Marion3ade6b62018-05-26 18:53:34 +0200420 vnet/ip/ip4_input.c
421
Damjan Marion7cd468a2016-12-19 23:05:39 +0100422########################################
423# Bidirectional Forwarding Detection
424########################################
425
426nobase_include_HEADERS += \
427 vnet/bfd/bfd_protocol.h \
428 vnet/bfd/bfd_main.h \
429 vnet/bfd/bfd_api.h \
430 vnet/bfd/bfd_udp.h \
431 vnet/bfd/bfd.api.h
432
433libvnet_la_SOURCES += \
434 vnet/bfd/bfd_api.h \
435 vnet/bfd/bfd_udp.c \
436 vnet/bfd/bfd_main.c \
437 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100438 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100439 vnet/bfd/bfd_api.c
440
441API_FILES += vnet/bfd/bfd.api
442
443########################################
444# Layer 3 protocol: IPSec
445########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100446if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100447libvnet_la_SOURCES += \
448 vnet/ipsec/ipsec.c \
449 vnet/ipsec/ipsec_cli.c \
450 vnet/ipsec/ipsec_format.c \
451 vnet/ipsec/ipsec_input.c \
452 vnet/ipsec/ipsec_if.c \
453 vnet/ipsec/ipsec_if_in.c \
Sergio Gonzalez Monroydb93cd92017-08-26 15:22:05 +0100454 vnet/ipsec/esp_format.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100455 vnet/ipsec/esp_encrypt.c \
456 vnet/ipsec/esp_decrypt.c \
“mukeshyadav1984”430ac932017-11-23 02:39:33 -0800457 vnet/ipsec/ah_decrypt.c \
458 vnet/ipsec/ah_encrypt.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100459 vnet/ipsec/ikev2.c \
460 vnet/ipsec/ikev2_crypto.c \
461 vnet/ipsec/ikev2_cli.c \
462 vnet/ipsec/ikev2_payload.c \
463 vnet/ipsec/ikev2_format.c \
464 vnet/ipsec/ipsec_api.c
465
466API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100467endif
468
469libvnet_la_SOURCES += \
470 vnet/ipsec/ipsec_output.c
471
472nobase_include_HEADERS += \
473 vnet/ipsec/ipsec.h \
474 vnet/ipsec/esp.h \
“mukeshyadav1984”430ac932017-11-23 02:39:33 -0800475 vnet/ipsec/ah.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100476 vnet/ipsec/ikev2.h \
477 vnet/ipsec/ikev2_priv.h \
478 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100479
480########################################
481# Layer 3 protocol: osi
482########################################
483libvnet_la_SOURCES += \
484 vnet/osi/node.c \
485 vnet/osi/osi.c \
486 vnet/osi/pg.c
487
488nobase_include_HEADERS += \
489 vnet/osi/osi.h
490
491########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500492# Layer 4 protocol: tcp
493########################################
494libvnet_la_SOURCES += \
Dave Barach3bbcfab2017-08-15 19:03:44 -0400495 vnet/tcp/tcp_api.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500496 vnet/tcp/tcp_format.c \
497 vnet/tcp/tcp_pg.c \
498 vnet/tcp/tcp_syn_filter4.c \
499 vnet/tcp/tcp_output.c \
500 vnet/tcp/tcp_input.c \
501 vnet/tcp/tcp_newreno.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700502 vnet/tcp/tcp_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500503 vnet/tcp/tcp.c
504
505nobase_include_HEADERS += \
506 vnet/tcp/tcp_packet.h \
507 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800508 vnet/tcp/tcp_debug.h \
Florin Corasc940f092017-08-23 11:24:02 -0700509 vnet/tcp/tcp.h \
510 vnet/tcp/tcp.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500511
Dave Barach3bbcfab2017-08-15 19:03:44 -0400512API_FILES += vnet/tcp/tcp.api
513
Dave Barach68b0fb02017-02-28 15:15:56 -0500514########################################
515# Layer 4 protocol: udp
516########################################
517libvnet_la_SOURCES += \
518 vnet/udp/udp.c \
519 vnet/udp/udp_input.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500520 vnet/udp/udp_format.c \
521 vnet/udp/udp_local.c \
Neale Ranns810086d2017-11-05 16:26:46 -0800522 vnet/udp/udp_pg.c \
523 vnet/udp/udp_encap_node.c \
524 vnet/udp/udp_encap.c \
525 vnet/udp/udp_api.c
Dave Barach68b0fb02017-02-28 15:15:56 -0500526
527nobase_include_HEADERS += \
528 vnet/udp/udp_error.def \
529 vnet/udp/udp.h \
Florin Corasf1493142017-11-09 14:17:27 -0800530 vnet/udp/udp_packet.h \
531 vnet/udp/udp.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100532
Neale Ranns810086d2017-11-05 16:26:46 -0800533API_FILES += vnet/udp/udp.api
534
Damjan Marion7cd468a2016-12-19 23:05:39 +0100535########################################
Marco Varlese191a5942017-10-30 18:17:21 +0100536# Layer 4 protocol: sctp
537########################################
538libvnet_la_SOURCES += \
Marco Varlese3c6a9762018-03-01 11:19:59 +0100539 vnet/sctp/sctp_api.c \
Marco Varlese191a5942017-10-30 18:17:21 +0100540 vnet/sctp/sctp.c \
541 vnet/sctp/sctp_pg.c \
542 vnet/sctp/sctp_input.c \
543 vnet/sctp/sctp_output.c \
Florin Coras4399c2e2018-01-25 06:34:42 -0800544 vnet/sctp/sctp_format.c
Marco Varlese191a5942017-10-30 18:17:21 +0100545
546nobase_include_HEADERS += \
547 vnet/sctp/sctp_error.def \
548 vnet/sctp/sctp_packet.h \
549 vnet/sctp/sctp_timer.h \
Marco Varlese3c6a9762018-03-01 11:19:59 +0100550 vnet/sctp/sctp.h \
551 vnet/sctp/sctp.api.h
552
553API_FILES += vnet/sctp/sctp.api
Marco Varlese191a5942017-10-30 18:17:21 +0100554
555########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100556# Tunnel protocol: gre
557########################################
558libvnet_la_SOURCES += \
559 vnet/gre/gre.c \
560 vnet/gre/node.c \
561 vnet/gre/interface.c \
562 vnet/gre/pg.c \
563 vnet/gre/gre_api.c
564
565nobase_include_HEADERS += \
566 vnet/gre/gre.h \
567 vnet/gre/packet.h \
568 vnet/gre/error.def \
569 vnet/gre/gre.api.h
570
571API_FILES += vnet/gre/gre.api
572
573########################################
Ole Troan298c6952018-03-08 12:30:43 +0100574# Tunnel protocol: ipip
575########################################
576libvnet_la_SOURCES += \
577 vnet/ipip/ipip.c \
578 vnet/ipip/node.c \
579 vnet/ipip/sixrd.c \
580 vnet/ipip/ipip_api.c \
581 vnet/ipip/ipip_cli.c
582
583nobase_include_HEADERS += \
Jon Loeliger1fcbd722018-03-14 14:08:43 -0500584 vnet/ipip/ipip.api.h \
Ole Troan298c6952018-03-08 12:30:43 +0100585 vnet/ipip/ipip.h
586
587API_FILES += vnet/ipip/ipip.api
588
589########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100590# Tunnel protocol: l2tpv3
591########################################
592libvnet_la_SOURCES += \
593 vnet/l2tp/l2tp.c \
594 vnet/l2tp/encap.c \
595 vnet/l2tp/decap.c \
596 vnet/l2tp/pg.c \
597 vnet/l2tp/l2tp_api.c
598
599nobase_include_HEADERS += \
600 vnet/l2tp/l2tp.h \
601 vnet/l2tp/packet.h \
602 vnet/l2tp/l2tp.api.h
603
604API_FILES += vnet/l2tp/l2tp.api
605
606########################################
607# Tunnel protocol: gre+mpls
608########################################
609libvnet_la_SOURCES += \
610 vnet/mpls/mpls.c \
611 vnet/mpls/mpls_lookup.c \
612 vnet/mpls/mpls_output.c \
613 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400614 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100615 vnet/mpls/interface.c \
616 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100617 vnet/mpls/pg.c \
618 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100619
620nobase_include_HEADERS += \
621 vnet/mpls/mpls.h \
622 vnet/mpls/mpls_types.h \
623 vnet/mpls/mpls_tunnel.h \
624 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100625 vnet/mpls/error.def \
626 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100627
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100628API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100629
630########################################
631# Tunnel protocol: vxlan-gpe
632########################################
633
634libvnet_la_SOURCES += \
635 vnet/vxlan-gpe/vxlan_gpe.c \
636 vnet/vxlan-gpe/encap.c \
637 vnet/vxlan-gpe/decap.c \
638 vnet/vxlan-gpe/vxlan_gpe_api.c
639
640nobase_include_HEADERS += \
641 vnet/vxlan-gpe/vxlan_gpe.h \
642 vnet/vxlan-gpe/vxlan_gpe_packet.h \
643 vnet/vxlan-gpe/vxlan_gpe_error.def \
644 vnet/vxlan-gpe/vxlan_gpe.api.h
645
646API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
647
648########################################
649# Tunnel protocol: ipsec+gre
650########################################
651libvnet_la_SOURCES += \
652 vnet/ipsec-gre/ipsec_gre.c \
653 vnet/ipsec-gre/node.c \
654 vnet/ipsec-gre/interface.c \
655 vnet/ipsec-gre/ipsec_gre_api.c
656
657nobase_include_HEADERS += \
658 vnet/ipsec-gre/ipsec_gre.h \
659 vnet/ipsec-gre/error.def \
660 vnet/ipsec-gre/ipsec_gre.api.h
661
662API_FILES += vnet/ipsec-gre/ipsec_gre.api
663
664########################################
665# LISP control plane: lisp-cp
666########################################
667
668libvnet_la_SOURCES += \
669 vnet/lisp-cp/lisp_types.c \
670 vnet/lisp-cp/lisp_cp_dpo.c \
671 vnet/lisp-cp/control.c \
672 vnet/lisp-cp/gid_dictionary.c \
673 vnet/lisp-cp/lisp_msg_serdes.c \
674 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100675 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800676 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100677 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100678 vnet/lisp-cp/lisp_api.c
679
680nobase_include_HEADERS += \
681 vnet/lisp-cp/lisp_types.h \
682 vnet/lisp-cp/packets.h \
683 vnet/lisp-cp/gid_dictionary.h \
684 vnet/lisp-cp/lisp_cp_messages.h \
685 vnet/lisp-cp/lisp_msg_serdes.h \
686 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100687 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100688 vnet/lisp-cp/lisp.api.h
689
690API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100691API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100692
693if ENABLE_TESTS
694LDS = \
695 libvppinfra.la \
696 libvnet.la \
697 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100698 libsvm.la \
699 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100700 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100701 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100702
703TESTS += test_cp_serdes test_lisp_types
704
705test_cp_serdes_SOURCES = \
706 tests/vnet/lisp-cp/test_cp_serdes.c \
707 vnet/lisp-cp/lisp_msg_serdes.c \
708 vnet/lisp-cp/lisp_types.c \
709 vnet/lisp-cp/packets.c \
710 vnet/ip/ip_checksum.c
711
712test_lisp_types_SOURCES = \
713 tests/vnet/lisp-cp/test_lisp_types.c \
714 vnet/lisp-cp/lisp_types.c
715
716test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
717test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
718
Damjan Marionc74a86a2017-01-16 14:00:03 +0100719test_cp_serdes_LDADD = $(LDS)
720test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100721endif
722
723########################################
724# Tunnel protocol: lisp-gpe
725########################################
726
727libvnet_la_SOURCES += \
728 vnet/lisp-gpe/lisp_gpe.c \
729 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
730 vnet/lisp-gpe/lisp_gpe_adjacency.c \
731 vnet/lisp-gpe/lisp_gpe_tunnel.c \
732 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
733 vnet/lisp-gpe/lisp_gpe_tenant.c \
734 vnet/lisp-gpe/interface.c \
735 vnet/lisp-gpe/decap.c \
736 vnet/lisp-gpe/lisp_gpe_api.c
737
738nobase_include_HEADERS += \
739 vnet/lisp-gpe/lisp_gpe.h \
740 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
741 vnet/lisp-gpe/lisp_gpe_tenant.h \
742 vnet/lisp-gpe/lisp_gpe_packet.h \
743 vnet/lisp-gpe/lisp_gpe_error.def \
744 vnet/lisp-gpe/lisp_gpe.api.h
745
746API_FILES += vnet/lisp-gpe/lisp_gpe.api
747
Damjan Marion7cd468a2016-12-19 23:05:39 +0100748########################################
749# DHCP client
750########################################
751libvnet_la_SOURCES += \
752 vnet/dhcp/client.c \
Neale Ranns54c6dc42018-01-17 10:29:10 -0800753 vnet/dhcp/dhcp_client_detect.c \
Juraj Slobodadd3b8f72018-05-04 14:20:06 +0200754 vnet/dhcp/dhcp6_client_common_dp.c \
Juraj Sloboda81119e82018-05-25 14:02:20 +0200755 vnet/dhcp/dhcp6_pd_client_dp.c \
756 vnet/dhcp/dhcp6_pd_client_cp.c \
Juraj Slobodadd3b8f72018-05-04 14:20:06 +0200757 vnet/dhcp/dhcp6_ia_na_client_dp.c \
758 vnet/dhcp/dhcp6_ia_na_client_cp.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100759 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100760
761nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800762 vnet/dhcp/client.h \
Juraj Slobodadd3b8f72018-05-04 14:20:06 +0200763 vnet/dhcp/dhcp6_client_common_dp.h \
Juraj Sloboda81119e82018-05-25 14:02:20 +0200764 vnet/dhcp/dhcp6_pd_client_dp.h \
Juraj Slobodadd3b8f72018-05-04 14:20:06 +0200765 vnet/dhcp/dhcp6_ia_na_client_dp.h \
Juraj Sloboda81119e82018-05-25 14:02:20 +0200766 vnet/dhcp/dhcp.api.h \
Juraj Slobodadd3b8f72018-05-04 14:20:06 +0200767 vnet/dhcp/dhcp6_pd_client_cp.api.h \
768 vnet/dhcp/dhcp6_ia_na_client_cp.api.h
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100769
Juraj Sloboda81119e82018-05-25 14:02:20 +0200770API_FILES += \
771 vnet/dhcp/dhcp.api \
Juraj Slobodadd3b8f72018-05-04 14:20:06 +0200772 vnet/dhcp/dhcp6_pd_client_cp.api \
773 vnet/dhcp/dhcp6_ia_na_client_cp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100774
775########################################
776# DHCP proxy
777########################################
778libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800779 vnet/dhcp/dhcp6_proxy_node.c \
780 vnet/dhcp/dhcp4_proxy_node.c \
781 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100782
783nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800784 vnet/dhcp/dhcp4_packet.h \
785 vnet/dhcp/dhcp6_packet.h \
786 vnet/dhcp/dhcp_proxy.h \
787 vnet/dhcp/dhcp6_proxy_error.def \
788 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100789
790########################################
791# ipv6 segment routing
792########################################
793
Damjan Marion7cd468a2016-12-19 23:05:39 +0100794libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200795 vnet/srv6/sr.c \
796 vnet/srv6/sr_localsid.c \
797 vnet/srv6/sr_policy_rewrite.c \
798 vnet/srv6/sr_steering.c \
799 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100800
801nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200802 vnet/srv6/sr_packet.h \
803 vnet/srv6/sr.h \
804 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100805
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200806API_FILES += vnet/srv6/sr.api
807
808########################################
809# mpls segment routing
810########################################
811
812libvnet_la_SOURCES += \
813 vnet/srmpls/sr_mpls_policy.c \
Pablo Camarillo42998822017-07-13 09:41:32 +0200814 vnet/srmpls/sr_mpls_steering.c \
815 vnet/srmpls/sr_mpls_api.c
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200816
817
818nobase_include_HEADERS += \
Pablo Camarillo42998822017-07-13 09:41:32 +0200819 vnet/srmpls/sr_mpls.h \
820 vnet/srmpls/sr_mpls.api.h
821
822API_FILES += vnet/srmpls/sr_mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100823
824########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100825# IPFIX / netflow v10
826########################################
827libvnet_la_SOURCES += \
Ole Troana9855ef2018-05-02 12:45:10 +0200828 vnet/ipfix-export/flow_report.c \
829 vnet/ipfix-export/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100830
831nobase_include_HEADERS += \
Ole Troana9855ef2018-05-02 12:45:10 +0200832 vnet/ipfix-export/flow_report.h \
833 vnet/ipfix-export/ipfix_info_elements.h \
834 vnet/ipfix-export/ipfix_packet.h \
835 vnet/ipfix-export/ipfix_export.api.h
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100836
Ole Troana9855ef2018-05-02 12:45:10 +0200837API_FILES += vnet/ipfix-export/ipfix_export.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100838
839########################################
840# IPFIX classify code
841########################################
842
843libvnet_la_SOURCES += \
Ole Troana9855ef2018-05-02 12:45:10 +0200844 vnet/ipfix-export/flow_report_classify.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100845
846nobase_include_HEADERS += \
Ole Troana9855ef2018-05-02 12:45:10 +0200847 vnet/ipfix-export/flow_report_classify.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100848
849########################################
850# lawful intercept
851########################################
852
853libvnet_la_SOURCES += \
854 vnet/lawful-intercept/lawful_intercept.c \
855 vnet/lawful-intercept/node.c
856
857nobase_include_HEADERS += \
858 vnet/lawful-intercept/lawful_intercept.h
859
860########################################
861# SPAN (port mirroring)
862########################################
863
864libvnet_la_SOURCES += \
865 vnet/span/span_api.c \
866 vnet/span/span.c \
867 vnet/span/node.c
868
869nobase_include_HEADERS += \
870 vnet/span/span.api.h \
871 vnet/span/span.h
872
873API_FILES += vnet/span/span.api
874
875########################################
Dave Barach65457162017-10-10 17:53:14 -0400876# DNS proxy, API
877########################################
878libvnet_la_SOURCES += \
879 vnet/dns/dns.c \
880 vnet/dns/dns.h \
881 vnet/dns/dns_packet.h \
882 vnet/dns/reply_node.c \
Dave Barach97494502017-11-04 09:44:38 -0400883 vnet/dns/request_node.c \
Dave Barach65457162017-10-10 17:53:14 -0400884 vnet/dns/resolver_process.c
885
886nobase_include_HEADERS += \
887 vnet/dns/dns.api.h \
888 vnet/dns/dns.h
889
890API_FILES += vnet/dns/dns.api
891
892########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100893# Packet generator
894########################################
895
896libvnet_la_SOURCES += \
897 vnet/pg/cli.c \
898 vnet/pg/edit.c \
899 vnet/pg/init.c \
900 vnet/pg/input.c \
901 vnet/pg/output.c \
Neale Rannsb8d44812017-11-10 06:53:54 -0800902 vnet/pg/stream.c \
903 vnet/pg/pg_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100904
905nobase_include_HEADERS += \
906 vnet/pg/pg.h \
Neale Rannsb8d44812017-11-10 06:53:54 -0800907 vnet/pg/edit.h \
908 vnet/pg/pg.api.h
909
910API_FILES += vnet/pg/pg.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100911
Damjan Marion7cd468a2016-12-19 23:05:39 +0100912########################################
913# virtio
914########################################
915
Damjan Marionc99b4cd2017-12-04 15:25:58 +0100916libvnet_la_SOURCES += \
917 vnet/devices/virtio/device.c \
918 vnet/devices/virtio/node.c \
919 vnet/devices/virtio/vhost-user.c \
920 vnet/devices/virtio/vhost_user_api.c \
Damjan Marion8389fb92017-10-13 18:29:53 +0200921 vnet/devices/virtio/virtio.c
922
Damjan Marion7cd468a2016-12-19 23:05:39 +0100923
Damjan Marionc99b4cd2017-12-04 15:25:58 +0100924nobase_include_HEADERS += \
925 vnet/devices/virtio/virtio.h \
926 vnet/devices/virtio/vhost-user.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100927 vnet/devices/virtio/vhost_user.api.h
928
929API_FILES += vnet/devices/virtio/vhost_user.api
930
931########################################
Damjan Marionc99b4cd2017-12-04 15:25:58 +0100932# tap interface (with virtio backend)
933########################################
934
935libvnet_la_SOURCES += \
936 vnet/devices/tap/cli.c \
937 vnet/devices/tap/tap.c \
938 vnet/devices/tap/tapv2_api.c
939
940nobase_include_HEADERS += \
941 vnet/devices/tap/tap.h \
942 vnet/devices/tap/tapv2.api.h
943
944API_FILES += vnet/devices/tap/tapv2.api
945
946########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500947# session managmeent
948########################################
949
950libvnet_la_SOURCES += \
951 vnet/session/session.c \
Florin Corascea194d2017-10-02 00:18:51 -0700952 vnet/session/session_table.c \
Florin Coras1c710452017-10-17 00:03:13 -0700953 vnet/session/session_rules_table.c \
Florin Coras04e53442017-07-16 17:12:15 -0700954 vnet/session/session_lookup.c \
955 vnet/session/session_node.c \
Florin Coras3cbc04b2017-10-02 00:18:51 -0700956 vnet/session/transport.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500957 vnet/session/application.c \
958 vnet/session/session_cli.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500959 vnet/session/application_interface.c \
Florin Corascea194d2017-10-02 00:18:51 -0700960 vnet/session/application_namespace.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700961 vnet/session/segment_manager.c \
Florin Corascea194d2017-10-02 00:18:51 -0700962 vnet/session/session_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500963 vnet/session/session_api.c
964
965nobase_include_HEADERS += \
966 vnet/session/session.h \
Florin Corascea194d2017-10-02 00:18:51 -0700967 vnet/session/session_table.h \
Florin Coras1c710452017-10-17 00:03:13 -0700968 vnet/session/session_rules_table.h \
Florin Coras04e53442017-07-16 17:12:15 -0700969 vnet/session/stream_session.h \
970 vnet/session/session_lookup.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500971 vnet/session/application.h \
972 vnet/session/transport.h \
Florin Coras04e53442017-07-16 17:12:15 -0700973 vnet/session/transport_interface.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800974 vnet/session/application_interface.h \
Florin Corascea194d2017-10-02 00:18:51 -0700975 vnet/session/application_namespace.h \
Florin Corase69f4952017-03-07 10:06:24 -0800976 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700977 vnet/session/segment_manager.h \
Florin Coras1c710452017-10-17 00:03:13 -0700978 vnet/session/mma_template.h \
979 vnet/session/mma_template.c \
980 vnet/session/mma_16.h \
981 vnet/session/mma_40.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800982 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500983
984API_FILES += vnet/session/session.api
985
986########################################
Florin Coras4399c2e2018-01-25 06:34:42 -0800987# session layer applications
988########################################
989
990libvnet_la_SOURCES += \
991 vnet/session-apps/echo_client.c \
992 vnet/session-apps/echo_server.c \
993 vnet/session-apps/http_server.c \
994 vnet/session-apps/proxy.c
995
996nobase_include_HEADERS += \
997 vnet/session-apps/echo_client.h \
998 vnet/session-apps/proxy.h
999
1000########################################
Florin Corasd77eee62018-03-07 08:49:27 -08001001# TLS protocol
1002########################################
1003
1004libvnet_la_SOURCES += vnet/tls/tls.c
1005
1006nobase_include_HEADERS += \
1007 vnet/tls/tls.h
1008
1009########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001010# Linux packet interface
1011########################################
1012
1013libvnet_la_SOURCES += \
1014 vnet/devices/af_packet/af_packet.c \
1015 vnet/devices/af_packet/device.c \
1016 vnet/devices/af_packet/node.c \
1017 vnet/devices/af_packet/cli.c \
1018 vnet/devices/af_packet/af_packet_api.c
1019
1020nobase_include_HEADERS += \
1021 vnet/devices/af_packet/af_packet.h \
1022 vnet/devices/af_packet/af_packet.api.h
1023
1024API_FILES += vnet/devices/af_packet/af_packet.api
1025
1026########################################
1027# NETMAP interface
1028########################################
1029
1030libvnet_la_SOURCES += \
1031 vnet/devices/netmap/netmap.c \
1032 vnet/devices/netmap/device.c \
1033 vnet/devices/netmap/node.c \
1034 vnet/devices/netmap/cli.c \
1035 vnet/devices/netmap/netmap_api.c
1036
1037nobase_include_HEADERS += \
1038 vnet/devices/netmap/netmap.h \
1039 vnet/devices/netmap/netmap.api.h
1040
1041API_FILES += vnet/devices/netmap/netmap.api
1042
1043########################################
1044# Driver feature graph arc support
1045########################################
1046
1047libvnet_la_SOURCES += \
1048 vnet/feature/feature.c \
Neale Rannsb8d44812017-11-10 06:53:54 -08001049 vnet/feature/feature_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001050 vnet/feature/registration.c
1051
1052nobase_include_HEADERS += \
Neale Rannsb8d44812017-11-10 06:53:54 -08001053 vnet/feature/feature.h \
1054 vnet/feature/feature.api.h
1055
1056API_FILES += vnet/feature/feature.api
Damjan Marion7cd468a2016-12-19 23:05:39 +01001057
1058########################################
1059# Unix kernel related
1060########################################
1061
1062# FIXME: vnet/unix/hgshm.c
1063
1064libvnet_la_SOURCES += \
1065 vnet/unix/gdb_funcs.c \
1066 vnet/unix/pcap.c \
1067 vnet/unix/tap_api.c \
1068 vnet/unix/tapcli.c \
1069 vnet/unix/tuntap.c
1070
1071nobase_include_HEADERS += \
1072 vnet/unix/pcap.h \
1073 vnet/unix/tuntap.h \
1074 vnet/unix/tap.api.h \
1075 vnet/unix/tapcli.h
1076
1077API_FILES += vnet/unix/tap.api
1078
1079########################################
1080# FIB
1081########################################
1082
1083libvnet_la_SOURCES += \
1084 vnet/fib/fib.c \
1085 vnet/fib/fib_test.c \
1086 vnet/fib/ip4_fib.c \
1087 vnet/fib/ip6_fib.c \
1088 vnet/fib/mpls_fib.c \
1089 vnet/fib/fib_table.c \
1090 vnet/fib/fib_walk.c \
1091 vnet/fib/fib_types.c \
1092 vnet/fib/fib_node.c \
1093 vnet/fib/fib_node_list.c \
1094 vnet/fib/fib_entry.c \
1095 vnet/fib/fib_entry_src.c \
1096 vnet/fib/fib_entry_src_rr.c \
1097 vnet/fib/fib_entry_src_interface.c \
Neale Ranns2303cb12018-02-21 04:57:17 -08001098 vnet/fib/fib_entry_src_interpose.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001099 vnet/fib/fib_entry_src_default_route.c \
1100 vnet/fib/fib_entry_src_special.c \
1101 vnet/fib/fib_entry_src_api.c \
1102 vnet/fib/fib_entry_src_adj.c \
1103 vnet/fib/fib_entry_src_mpls.c \
1104 vnet/fib/fib_entry_src_lisp.c \
1105 vnet/fib/fib_entry_cover.c \
1106 vnet/fib/fib_entry_delegate.c \
1107 vnet/fib/fib_path_list.c \
1108 vnet/fib/fib_path.c \
1109 vnet/fib/fib_path_ext.c \
1110 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -07001111 vnet/fib/fib_attached_export.c \
Neale Ranns81458422018-03-12 06:59:36 -07001112 vnet/fib/fib_api.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -07001113 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +01001114
1115nobase_include_HEADERS += \
1116 vnet/fib/fib.h \
1117 vnet/fib/fib_api.h \
1118 vnet/fib/ip4_fib.h \
1119 vnet/fib/ip6_fib.h \
1120 vnet/fib/fib_types.h \
1121 vnet/fib/fib_table.h \
1122 vnet/fib/fib_node.h \
1123 vnet/fib/fib_node_list.h \
1124 vnet/fib/fib_entry.h \
1125 vnet/fib/fib_entry_delegate.h
1126
1127########################################
1128# ADJ
1129########################################
1130
1131libvnet_la_SOURCES += \
1132 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001133 vnet/adj/adj_glean.c \
1134 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001135 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001136 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -08001137 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -08001138 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -07001139 vnet/adj/rewrite.c \
1140 vnet/adj/adj_bfd.c \
1141 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +01001142
1143nobase_include_HEADERS += \
1144 vnet/adj/adj.h \
1145 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001146 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -08001147 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -08001148 vnet/adj/adj_nbr.h \
1149 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +01001150
1151########################################
1152# Data-Plane Objects
1153########################################
1154
1155libvnet_la_SOURCES += \
1156 vnet/dpo/dpo.c \
1157 vnet/dpo/drop_dpo.c \
1158 vnet/dpo/ip_null_dpo.c \
Neale Ranns53da2212018-02-24 02:11:19 -08001159 vnet/dpo/ip6_ll_dpo.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001160 vnet/dpo/punt_dpo.c \
1161 vnet/dpo/receive_dpo.c \
1162 vnet/dpo/load_balance.c \
1163 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +00001164 vnet/dpo/lookup_dpo.c \
1165 vnet/dpo/classify_dpo.c \
1166 vnet/dpo/replicate_dpo.c \
Neale Ranns43161a82017-08-12 02:12:00 -07001167 vnet/dpo/interface_rx_dpo.c \
1168 vnet/dpo/interface_tx_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -08001169 vnet/dpo/mpls_disposition.c \
Neale Ranns6f631152017-10-03 08:20:21 -07001170 vnet/dpo/mpls_label_dpo.c \
Andrew Yourtchenko5f3fcb92017-10-25 05:50:37 -07001171 vnet/dpo/l3_proxy_dpo.c \
Neale Rannsf068c3e2018-01-03 04:18:48 -08001172 vnet/dpo/dvr_dpo.c
Damjan Marion7cd468a2016-12-19 23:05:39 +01001173
1174nobase_include_HEADERS += \
1175 vnet/dpo/load_balance.h \
1176 vnet/dpo/drop_dpo.h \
1177 vnet/dpo/lookup_dpo.h \
1178 vnet/dpo/punt_dpo.h \
1179 vnet/dpo/classify_dpo.h \
1180 vnet/dpo/receive_dpo.h \
1181 vnet/dpo/ip_null_dpo.h \
Neale Ranns60c1c7c2017-11-02 07:39:24 -07001182 vnet/dpo/replicate_dpo.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +01001183 vnet/dpo/dpo.h
1184
1185########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001186# Multicast FIB
1187########################################
1188
1189libvnet_la_SOURCES += \
1190 vnet/mfib/mfib_test.c \
1191 vnet/mfib/mfib_forward.c \
1192 vnet/mfib/ip4_mfib.c \
1193 vnet/mfib/ip6_mfib.c \
1194 vnet/mfib/mfib_types.c \
1195 vnet/mfib/mfib_signal.c \
1196 vnet/mfib/mfib_itf.c \
1197 vnet/mfib/mfib_entry.c \
1198 vnet/mfib/mfib_table.c
1199
1200nobase_include_HEADERS += \
1201 vnet/mfib/ip4_mfib.h \
1202 vnet/mfib/mfib_types.h \
1203 vnet/mfib/mfib_table.h
1204
1205########################################
1206# Utilities
1207########################################
1208
1209libvnet_la_SOURCES += \
Hongjun Nibf4be572017-11-13 20:34:06 +08001210 vnet/util/radix.c \
1211 vnet/util/refcount.c \
Dave Barach7bee7732017-10-18 18:48:11 -04001212 vnet/util/trajectory.c
Neale Ranns32e1c012016-11-22 17:07:28 +00001213
1214########################################
Neale Ranns039cbfe2018-02-27 03:45:38 -08001215# QoS
1216########################################
1217
1218libvnet_la_SOURCES += \
1219 vnet/qos/qos_types.c \
1220 vnet/qos/qos_api.c \
1221 vnet/qos/qos_egress_map.c \
1222 vnet/qos/qos_record.c \
1223 vnet/qos/qos_mark.c
1224
1225API_FILES += vnet/qos/qos.api
1226
Matus Fabian489cc822018-03-19 03:58:41 -07001227nobase_include_HEADERS += \
1228 vnet/qos/qos.api.h
1229
Neale Ranns039cbfe2018-02-27 03:45:38 -08001230########################################
Neale Rannsd792d9c2017-10-21 10:53:20 -07001231# BIER
1232########################################
1233
1234libvnet_la_SOURCES += \
1235 vnet/bier/bier_bit_string.c \
1236 vnet/bier/bier_entry.c \
1237 vnet/bier/bier_fmask.c \
1238 vnet/bier/bier_fmask_db.c \
1239 vnet/bier/bier_input.c \
1240 vnet/bier/bier_lookup.c \
1241 vnet/bier/bier_output.c \
1242 vnet/bier/bier_table.c \
1243 vnet/bier/bier_types.c \
1244 vnet/bier/bier_test.c \
1245 vnet/bier/bier_api.c \
1246 vnet/bier/bier_drop.c \
1247 vnet/bier/bier_update.c \
1248 vnet/bier/bier_imp_node.c \
1249 vnet/bier/bier_imp.c \
1250 vnet/bier/bier_disp_entry.c \
1251 vnet/bier/bier_disp_lookup_node.c \
1252 vnet/bier/bier_disp_dispatch_node.c \
Neale Ranns91286372017-12-05 13:24:04 -08001253 vnet/bier/bier_disp_table.c \
1254 vnet/bier/bier_bift_table.c
Neale Rannsd792d9c2017-10-21 10:53:20 -07001255
1256nobase_include_HEADERS += \
1257 vnet/bier/bier_types.h \
1258 vnet/bier/bier_entry.h \
1259 vnet/bier/bier_update.h \
1260 vnet/bier/bier.api.h \
1261 vnet/bier/bier_table.h
1262
1263API_FILES += vnet/bier/bier.api
1264
Damjan Marionf3b27462018-05-15 19:51:38 +02001265if CPU_X86_64
1266if CC_SUPPORTS_AVX2
1267###############################################################
1268# AVX2
1269###############################################################
Damjan Marion812b32d2018-05-28 21:26:47 +02001270libvnet_avx2_la_SOURCES = $(libvnet_multiversioning_sources)
Damjan Marionf3b27462018-05-15 19:51:38 +02001271libvnet_avx2_la_CFLAGS = \
1272 $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
Damjan Marion812b32d2018-05-28 21:26:47 +02001273 -DCLIB_MARCH_VARIANT=avx2
Damjan Marionf3b27462018-05-15 19:51:38 +02001274noinst_LTLIBRARIES += libvnet_avx2.la
1275libvnet_la_LIBADD += libvnet_avx2.la
1276endif
1277
1278if CC_SUPPORTS_AVX512
1279###############################################################
1280# AVX512
1281###############################################################
Damjan Marion812b32d2018-05-28 21:26:47 +02001282libvnet_avx512_la_SOURCES = $(libvnet_multiversioning_sources)
Damjan Marionf3b27462018-05-15 19:51:38 +02001283libvnet_avx512_la_CFLAGS = \
1284 $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
Damjan Marion812b32d2018-05-28 21:26:47 +02001285 -DCLIB_MARCH_VARIANT=avx512
Damjan Marionf3b27462018-05-15 19:51:38 +02001286noinst_LTLIBRARIES += libvnet_avx512.la
1287libvnet_la_LIBADD += libvnet_avx512.la
1288endif
1289endif
1290
Neale Rannsd792d9c2017-10-21 10:53:20 -07001291########################################
Florin Coras891f0a12017-12-11 11:49:26 -08001292# Test apps
1293########################################
1294
1295noinst_PROGRAMS += tcp_echo udp_echo
1296
1297TEST_APPS_LDADD = libvlibmemoryclient.la libsvm.la libvppinfra.la
1298TEST_APPS_LDADD += -lpthread -lm -lrt
1299
1300tcp_echo_SOURCES = tests/vnet/session/tcp_echo.c
1301tcp_echo_LDADD = $(TEST_APPS_LDADD)
1302
1303udp_echo_SOURCES = tests/vnet/session/udp_echo.c
1304udp_echo_LDADD = $(TEST_APPS_LDADD)
1305
1306########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001307# Plugin client library
1308########################################
1309
Damjan Marion7cd468a2016-12-19 23:05:39 +01001310nobase_include_HEADERS += \
1311 vnet/plugin/plugin.h
1312
Damjan Marion7cd468a2016-12-19 23:05:39 +01001313pcap2pg_SOURCES = \
1314 vnet/unix/pcap2pg.c \
1315 vnet/unix/pcap.h
1316
1317pcap2pg_LDFLAGS = -static
1318pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1319
Dave Baracha0cc5ab2018-02-23 12:09:41 -05001320pcap2cinit_SOURCES = \
1321 vnet/unix/pcap2cinit.c \
1322 vnet/unix/pcap.h
1323
1324pcap2cinit_LDFLAGS = -static
1325pcap2cinit_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1326
1327noinst_PROGRAMS += pcap2pg pcap2cinit
Damjan Marion7cd468a2016-12-19 23:05:39 +01001328
1329# vi:syntax=automake