blob: 361a838b811ffb2752062c05f5bfe34416d5dd98 [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 \
116 vnet/ethernet/sfp.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100117
118nobase_include_HEADERS += \
119 vnet/ethernet/arp_packet.h \
120 vnet/ethernet/error.def \
121 vnet/ethernet/ethernet.h \
122 vnet/ethernet/packet.h \
Damjan Marion374e2c52017-03-09 20:38:15 +0100123 vnet/ethernet/types.def \
124 vnet/ethernet/sfp.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100125
126########################################
127# Layer 2 protocol: Ethernet bridging
128########################################
129libvnet_la_SOURCES += \
130 vnet/l2/feat_bitmap.c \
131 vnet/l2/l2_api.c \
132 vnet/l2/l2_bd.c \
133 vnet/l2/l2_bvi.c \
134 vnet/l2/l2_input_classify.c \
135 vnet/l2/l2_output_classify.c \
136 vnet/l2/l2_efp_filter.c \
137 vnet/l2/l2_fib.c \
138 vnet/l2/l2_flood.c \
139 vnet/l2/l2_fwd.c \
140 vnet/l2/l2_input_acl.c \
141 vnet/l2/l2_input.c \
142 vnet/l2/l2_input_vtr.c \
143 vnet/l2/l2_learn.c \
144 vnet/l2/l2_output_acl.c \
145 vnet/l2/l2_output.c \
146 vnet/l2/l2_patch.c \
147 vnet/l2/l2_rw.c \
148 vnet/l2/l2_vtr.c \
149 vnet/l2/l2_xcrw.c
150
151nobase_include_HEADERS += \
152 vnet/l2/feat_bitmap.h \
153 vnet/l2/l2_input.h \
154 vnet/l2/l2_output.h \
155 vnet/l2/l2_vtr.h \
156 vnet/l2/l2_input_vtr.h \
157 vnet/l2/l2_efp_filter.h \
158 vnet/l2/l2_fwd.h \
159 vnet/l2/l2_bd.h \
160 vnet/l2/l2_bvi.h \
161 vnet/l2/l2_flood.h \
162 vnet/l2/l2_fib.h \
163 vnet/l2/l2_rw.h \
164 vnet/l2/l2_xcrw.h \
165 vnet/l2/l2_classify.h \
166 vnet/l2/l2.api.h
167
168API_FILES += vnet/l2/l2.api
169
170########################################
171# Layer 2 protocol: SRP
172########################################
173libvnet_la_SOURCES += \
174 vnet/srp/format.c \
175 vnet/srp/interface.c \
176 vnet/srp/node.c \
177 vnet/srp/pg.c
178
179nobase_include_HEADERS += \
180 vnet/srp/packet.h \
181 vnet/srp/srp.h
182
183########################################
184# Layer 2 protocol: PPP
185########################################
186libvnet_la_SOURCES += \
187 vnet/ppp/node.c \
188 vnet/ppp/pg.c \
189 vnet/ppp/ppp.c
190
191nobase_include_HEADERS += \
192 vnet/ppp/error.def \
193 vnet/ppp/ppp.h \
194 vnet/ppp/packet.h
195
196########################################
197# Layer 2 protocol: HDLC
198########################################
199libvnet_la_SOURCES += \
200 vnet/hdlc/node.c \
201 vnet/hdlc/pg.c \
202 vnet/hdlc/hdlc.c
203
204nobase_include_HEADERS += \
205 vnet/hdlc/error.def \
206 vnet/hdlc/hdlc.h \
207 vnet/hdlc/packet.h
208
209########################################
210# Layer 2 protocol: LLC
211########################################
212libvnet_la_SOURCES += \
213 vnet/llc/llc.c \
214 vnet/llc/node.c \
215 vnet/llc/pg.c
216
217nobase_include_HEADERS += \
218 vnet/llc/llc.h
219
220########################################
221# Layer 2 protocol: SNAP
222########################################
223libvnet_la_SOURCES += \
224 vnet/snap/snap.c \
225 vnet/snap/node.c \
226 vnet/snap/pg.c
227
228nobase_include_HEADERS += \
229 vnet/snap/snap.h
230
231########################################
232# Layer 2 / vxlan
233########################################
234libvnet_la_SOURCES += \
235 vnet/vxlan/vxlan.c \
236 vnet/vxlan/encap.c \
237 vnet/vxlan/decap.c \
238 vnet/vxlan/vxlan_api.c
239
240nobase_include_HEADERS += \
241 vnet/vxlan/vxlan.h \
242 vnet/vxlan/vxlan_packet.h \
243 vnet/vxlan/vxlan_error.def \
244 vnet/vxlan/vxlan.api.h
245
246API_FILES += vnet/vxlan/vxlan.api
247
248########################################
249# Layer 2 / CDP
250########################################
251libvnet_la_SOURCES += \
252 vnet/cdp/cdp_input.c \
253 vnet/cdp/cdp_node.c \
254 vnet/cdp/cdp_periodic.c
255
256nobase_include_HEADERS += \
257 vnet/cdp/cdp_protocol.h
258
259########################################
260# Layer 2 / LLDP
261########################################
262libvnet_la_SOURCES += \
263 vnet/lldp/lldp_input.c \
264 vnet/lldp/lldp_node.c \
265 vnet/lldp/lldp_output.c \
266 vnet/lldp/lldp_cli.c
267
268nobase_include_HEADERS += \
269 vnet/lldp/lldp_protocol.h
270
271########################################
272# Layer 2/3 "classify"
273########################################
274libvnet_la_SOURCES += \
275 vnet/classify/vnet_classify.c \
276 vnet/classify/ip_classify.c \
277 vnet/classify/input_acl.c \
278 vnet/classify/policer_classify.c \
279 vnet/classify/flow_classify.c \
280 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100281 vnet/classify/vnet_classify.h \
282 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100283
284nobase_include_HEADERS += \
285 vnet/classify/vnet_classify.h \
286 vnet/classify/input_acl.h \
287 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100288 vnet/classify/flow_classify.h \
289 vnet/classify/classify.api.h
290
291API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100292
293########################################
294# Layer 3 protocols go here
295########################################
296
297########################################
298# Layer 3 protocol: IP v4/v6
299########################################
300libvnet_la_SOURCES += \
301 vnet/ip/format.c \
302 vnet/ip/icmp4.c \
303 vnet/ip/icmp6.c \
304 vnet/ip/ip46_cli.c \
305 vnet/ip/ip4_format.c \
306 vnet/ip/ip4_forward.c \
307 vnet/ip/ip4_input.c \
308 vnet/ip/ip4_mtrie.c \
309 vnet/ip/ip4_pg.c \
310 vnet/ip/ip4_source_and_port_range_check.c \
311 vnet/ip/ip4_source_check.c \
312 vnet/ip/ip6_format.c \
313 vnet/ip/ip6_forward.c \
314 vnet/ip/ip6_hop_by_hop.c \
315 vnet/ip/ip6_input.c \
316 vnet/ip/ip6_neighbor.c \
317 vnet/ip/ip6_pg.c \
318 vnet/ip/ip_api.c \
319 vnet/ip/ip_checksum.c \
320 vnet/ip/ip_frag.c \
321 vnet/ip/ip.h \
322 vnet/ip/ip_init.c \
323 vnet/ip/ip_input_acl.c \
324 vnet/ip/lookup.c \
325 vnet/ip/ping.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500326 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100327
328nobase_include_HEADERS += \
329 vnet/ip/format.h \
330 vnet/ip/icmp46_packet.h \
331 vnet/ip/icmp4.h \
332 vnet/ip/icmp6.h \
333 vnet/ip/igmp_packet.h \
334 vnet/ip/ip.api.h \
335 vnet/ip/ip4_error.h \
336 vnet/ip/ip4.h \
337 vnet/ip/ip4_mtrie.h \
338 vnet/ip/ip4_packet.h \
339 vnet/ip/ip6_error.h \
340 vnet/ip/ip6.h \
341 vnet/ip/ip6_hop_by_hop.h \
342 vnet/ip/ip6_hop_by_hop_packet.h \
343 vnet/ip/ip6_packet.h \
344 vnet/ip/ip6_neighbor.h \
345 vnet/ip/ip.h \
346 vnet/ip/ip_packet.h \
347 vnet/ip/ip_source_and_port_range_check.h \
348 vnet/ip/lookup.h \
349 vnet/ip/ports.def \
350 vnet/ip/protocols.def \
351 vnet/ip/punt_error.def \
Dave Barach68b0fb02017-02-28 15:15:56 -0500352 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100353
354API_FILES += vnet/ip/ip.api
355
356########################################
357# Bidirectional Forwarding Detection
358########################################
359
360nobase_include_HEADERS += \
361 vnet/bfd/bfd_protocol.h \
362 vnet/bfd/bfd_main.h \
363 vnet/bfd/bfd_api.h \
364 vnet/bfd/bfd_udp.h \
365 vnet/bfd/bfd.api.h
366
367libvnet_la_SOURCES += \
368 vnet/bfd/bfd_api.h \
369 vnet/bfd/bfd_udp.c \
370 vnet/bfd/bfd_main.c \
371 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100372 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100373 vnet/bfd/bfd_api.c
374
375API_FILES += vnet/bfd/bfd.api
376
377########################################
378# Layer 3 protocol: IPSec
379########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100380if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100381libvnet_la_SOURCES += \
382 vnet/ipsec/ipsec.c \
383 vnet/ipsec/ipsec_cli.c \
384 vnet/ipsec/ipsec_format.c \
385 vnet/ipsec/ipsec_input.c \
386 vnet/ipsec/ipsec_if.c \
387 vnet/ipsec/ipsec_if_in.c \
388 vnet/ipsec/ipsec_if_out.c \
389 vnet/ipsec/esp_encrypt.c \
390 vnet/ipsec/esp_decrypt.c \
391 vnet/ipsec/ikev2.c \
392 vnet/ipsec/ikev2_crypto.c \
393 vnet/ipsec/ikev2_cli.c \
394 vnet/ipsec/ikev2_payload.c \
395 vnet/ipsec/ikev2_format.c \
396 vnet/ipsec/ipsec_api.c
397
398API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100399endif
400
401libvnet_la_SOURCES += \
402 vnet/ipsec/ipsec_output.c
403
404nobase_include_HEADERS += \
405 vnet/ipsec/ipsec.h \
406 vnet/ipsec/esp.h \
407 vnet/ipsec/ikev2.h \
408 vnet/ipsec/ikev2_priv.h \
409 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100410
411########################################
412# Layer 3 protocol: osi
413########################################
414libvnet_la_SOURCES += \
415 vnet/osi/node.c \
416 vnet/osi/osi.c \
417 vnet/osi/pg.c
418
419nobase_include_HEADERS += \
420 vnet/osi/osi.h
421
422########################################
423# Layer 3 protocol: MAP
424########################################
425libvnet_la_SOURCES += \
426 vnet/map/map.c \
427 vnet/map/map_dpo.c \
428 vnet/map/ip4_map.c \
429 vnet/map/ip6_map.c \
430 vnet/map/ip4_map_t.c \
431 vnet/map/ip6_map_t.c \
432 vnet/map/map_api.c
433
434nobase_include_HEADERS += \
435 vnet/map/map.h \
436 vnet/map/map_dpo.h \
437 vnet/map/map.api.h
438
439API_FILES += vnet/map/map.api
440
441if ENABLE_TESTS
442TESTS += test_map
443test_map_SOURCES = \
444 vnet/map/test.c
445test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
446
447test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Dave Barach654ceaf2017-03-29 16:59:02 -0400448 -lpthread -lvlibmemory -ldl -lsvm -lrt
Damjan Marion7cd468a2016-12-19 23:05:39 +0100449
450test_map_LDFLAGS = -static
451endif
452
Dave Barach68b0fb02017-02-28 15:15:56 -0500453########################################
454# Layer 4 protocol: tcp
455########################################
456libvnet_la_SOURCES += \
457 vnet/tcp/tcp_format.c \
458 vnet/tcp/tcp_pg.c \
459 vnet/tcp/tcp_syn_filter4.c \
460 vnet/tcp/tcp_output.c \
461 vnet/tcp/tcp_input.c \
462 vnet/tcp/tcp_newreno.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700463 vnet/tcp/builtin_client.c \
Florin Corase04c2992017-03-01 08:17:34 -0800464 vnet/tcp/builtin_server.c \
Dave Barach1015a1e2017-05-08 19:15:03 -0400465 vnet/tcp/builtin_http_server.c \
Florin Coras6792ec02017-03-13 03:49:51 -0700466 vnet/tcp/tcp_test.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500467 vnet/tcp/tcp.c
468
469nobase_include_HEADERS += \
470 vnet/tcp/tcp_packet.h \
471 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800472 vnet/tcp/tcp_debug.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500473 vnet/tcp/tcp.h
474
475########################################
476# Layer 4 protocol: udp
477########################################
478libvnet_la_SOURCES += \
479 vnet/udp/udp.c \
480 vnet/udp/udp_input.c \
481 vnet/udp/builtin_server.c \
482 vnet/udp/udp_format.c \
483 vnet/udp/udp_local.c \
484 vnet/udp/udp_pg.c
485
486nobase_include_HEADERS += \
487 vnet/udp/udp_error.def \
488 vnet/udp/udp.h \
489 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100490
491########################################
492# Tunnel protocol: gre
493########################################
494libvnet_la_SOURCES += \
495 vnet/gre/gre.c \
496 vnet/gre/node.c \
497 vnet/gre/interface.c \
498 vnet/gre/pg.c \
499 vnet/gre/gre_api.c
500
501nobase_include_HEADERS += \
502 vnet/gre/gre.h \
503 vnet/gre/packet.h \
504 vnet/gre/error.def \
505 vnet/gre/gre.api.h
506
507API_FILES += vnet/gre/gre.api
508
509########################################
510# Tunnel protocol: l2tpv3
511########################################
512libvnet_la_SOURCES += \
513 vnet/l2tp/l2tp.c \
514 vnet/l2tp/encap.c \
515 vnet/l2tp/decap.c \
516 vnet/l2tp/pg.c \
517 vnet/l2tp/l2tp_api.c
518
519nobase_include_HEADERS += \
520 vnet/l2tp/l2tp.h \
521 vnet/l2tp/packet.h \
522 vnet/l2tp/l2tp.api.h
523
524API_FILES += vnet/l2tp/l2tp.api
525
526########################################
527# Tunnel protocol: gre+mpls
528########################################
529libvnet_la_SOURCES += \
530 vnet/mpls/mpls.c \
531 vnet/mpls/mpls_lookup.c \
532 vnet/mpls/mpls_output.c \
533 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400534 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100535 vnet/mpls/interface.c \
536 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100537 vnet/mpls/pg.c \
538 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100539
540nobase_include_HEADERS += \
541 vnet/mpls/mpls.h \
542 vnet/mpls/mpls_types.h \
543 vnet/mpls/mpls_tunnel.h \
544 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100545 vnet/mpls/error.def \
546 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100547
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100548API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100549
550########################################
551# Tunnel protocol: vxlan-gpe
552########################################
553
554libvnet_la_SOURCES += \
555 vnet/vxlan-gpe/vxlan_gpe.c \
556 vnet/vxlan-gpe/encap.c \
557 vnet/vxlan-gpe/decap.c \
558 vnet/vxlan-gpe/vxlan_gpe_api.c
559
560nobase_include_HEADERS += \
561 vnet/vxlan-gpe/vxlan_gpe.h \
562 vnet/vxlan-gpe/vxlan_gpe_packet.h \
563 vnet/vxlan-gpe/vxlan_gpe_error.def \
564 vnet/vxlan-gpe/vxlan_gpe.api.h
565
566API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
567
568########################################
569# Tunnel protocol: ipsec+gre
570########################################
571libvnet_la_SOURCES += \
572 vnet/ipsec-gre/ipsec_gre.c \
573 vnet/ipsec-gre/node.c \
574 vnet/ipsec-gre/interface.c \
575 vnet/ipsec-gre/ipsec_gre_api.c
576
577nobase_include_HEADERS += \
578 vnet/ipsec-gre/ipsec_gre.h \
579 vnet/ipsec-gre/error.def \
580 vnet/ipsec-gre/ipsec_gre.api.h
581
582API_FILES += vnet/ipsec-gre/ipsec_gre.api
583
584########################################
585# LISP control plane: lisp-cp
586########################################
587
588libvnet_la_SOURCES += \
589 vnet/lisp-cp/lisp_types.c \
590 vnet/lisp-cp/lisp_cp_dpo.c \
591 vnet/lisp-cp/control.c \
592 vnet/lisp-cp/gid_dictionary.c \
593 vnet/lisp-cp/lisp_msg_serdes.c \
594 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100595 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800596 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100597 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100598 vnet/lisp-cp/lisp_api.c
599
600nobase_include_HEADERS += \
601 vnet/lisp-cp/lisp_types.h \
602 vnet/lisp-cp/packets.h \
603 vnet/lisp-cp/gid_dictionary.h \
604 vnet/lisp-cp/lisp_cp_messages.h \
605 vnet/lisp-cp/lisp_msg_serdes.h \
606 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100607 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100608 vnet/lisp-cp/lisp.api.h
609
610API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100611API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100612
613if ENABLE_TESTS
614LDS = \
615 libvppinfra.la \
616 libvnet.la \
617 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100618 libsvm.la \
619 libsvmdb.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100620 libvlibmemory.la \
Damjan Marionc74a86a2017-01-16 14:00:03 +0100621 -lpthread -ldl -lrt -lm
Damjan Marion7cd468a2016-12-19 23:05:39 +0100622
623TESTS += test_cp_serdes test_lisp_types
624
625test_cp_serdes_SOURCES = \
626 tests/vnet/lisp-cp/test_cp_serdes.c \
627 vnet/lisp-cp/lisp_msg_serdes.c \
628 vnet/lisp-cp/lisp_types.c \
629 vnet/lisp-cp/packets.c \
630 vnet/ip/ip_checksum.c
631
632test_lisp_types_SOURCES = \
633 tests/vnet/lisp-cp/test_lisp_types.c \
634 vnet/lisp-cp/lisp_types.c
635
636test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
637test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
638
Damjan Marionc74a86a2017-01-16 14:00:03 +0100639test_cp_serdes_LDADD = $(LDS)
640test_lisp_types_LDADD = $(LDS)
Damjan Marion7cd468a2016-12-19 23:05:39 +0100641endif
642
643########################################
644# Tunnel protocol: lisp-gpe
645########################################
646
647libvnet_la_SOURCES += \
648 vnet/lisp-gpe/lisp_gpe.c \
649 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
650 vnet/lisp-gpe/lisp_gpe_adjacency.c \
651 vnet/lisp-gpe/lisp_gpe_tunnel.c \
652 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
653 vnet/lisp-gpe/lisp_gpe_tenant.c \
654 vnet/lisp-gpe/interface.c \
655 vnet/lisp-gpe/decap.c \
656 vnet/lisp-gpe/lisp_gpe_api.c
657
658nobase_include_HEADERS += \
659 vnet/lisp-gpe/lisp_gpe.h \
660 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
661 vnet/lisp-gpe/lisp_gpe_tenant.h \
662 vnet/lisp-gpe/lisp_gpe_packet.h \
663 vnet/lisp-gpe/lisp_gpe_error.def \
664 vnet/lisp-gpe/lisp_gpe.api.h
665
666API_FILES += vnet/lisp-gpe/lisp_gpe.api
667
Damjan Marion7cd468a2016-12-19 23:05:39 +0100668########################################
669# DHCP client
670########################################
671libvnet_la_SOURCES += \
672 vnet/dhcp/client.c \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100673 vnet/dhcp/client.h \
674 vnet/dhcp/dhcp_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100675
676nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800677 vnet/dhcp/client.h \
Pavel Kotucekc8d87702017-01-25 07:25:32 +0100678 vnet/dhcp/dhcp.api.h
679
680API_FILES += vnet/dhcp/dhcp.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100681
682########################################
683# DHCP proxy
684########################################
685libvnet_la_SOURCES += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800686 vnet/dhcp/dhcp6_proxy_node.c \
687 vnet/dhcp/dhcp4_proxy_node.c \
688 vnet/dhcp/dhcp_proxy.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100689
690nobase_include_HEADERS += \
Neale Ranns2dd68522017-02-16 03:38:59 -0800691 vnet/dhcp/dhcp4_packet.h \
692 vnet/dhcp/dhcp6_packet.h \
693 vnet/dhcp/dhcp_proxy.h \
694 vnet/dhcp/dhcp6_proxy_error.def \
695 vnet/dhcp/dhcp4_proxy_error.def
Damjan Marion7cd468a2016-12-19 23:05:39 +0100696
697########################################
698# ipv6 segment routing
699########################################
700
Damjan Marion7cd468a2016-12-19 23:05:39 +0100701libvnet_la_SOURCES += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200702 vnet/srv6/sr.c \
703 vnet/srv6/sr_localsid.c \
704 vnet/srv6/sr_policy_rewrite.c \
705 vnet/srv6/sr_steering.c \
706 vnet/srv6/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100707
708nobase_include_HEADERS += \
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200709 vnet/srv6/sr_packet.h \
710 vnet/srv6/sr.h \
711 vnet/srv6/sr.api.h
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100712
Pablo Camarillo5d73eec2017-04-24 17:51:56 +0200713API_FILES += vnet/srv6/sr.api
714
715########################################
716# mpls segment routing
717########################################
718
719libvnet_la_SOURCES += \
720 vnet/srmpls/sr_mpls_policy.c \
721 vnet/srmpls/sr_mpls_steering.c
722
723
724nobase_include_HEADERS += \
725 vnet/srmpls/sr.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100726
727########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100728# IPFIX / netflow v10
729########################################
730libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100731 vnet/flow/flow_report.c \
732 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100733
734nobase_include_HEADERS += \
735 vnet/flow/flow_report.h \
736 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100737 vnet/flow/ipfix_packet.h \
738 vnet/flow/flow.api.h
739
740API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100741
742########################################
743# IPFIX classify code
744########################################
745
746libvnet_la_SOURCES += \
747 vnet/flow/flow_report_classify.c
748
749nobase_include_HEADERS += \
750 vnet/flow/flow_report_classify.h
751
752########################################
753# lawful intercept
754########################################
755
756libvnet_la_SOURCES += \
757 vnet/lawful-intercept/lawful_intercept.c \
758 vnet/lawful-intercept/node.c
759
760nobase_include_HEADERS += \
761 vnet/lawful-intercept/lawful_intercept.h
762
763########################################
764# SPAN (port mirroring)
765########################################
766
767libvnet_la_SOURCES += \
768 vnet/span/span_api.c \
769 vnet/span/span.c \
770 vnet/span/node.c
771
772nobase_include_HEADERS += \
773 vnet/span/span.api.h \
774 vnet/span/span.h
775
776API_FILES += vnet/span/span.api
777
778########################################
779# Packet generator
780########################################
781
782libvnet_la_SOURCES += \
783 vnet/pg/cli.c \
784 vnet/pg/edit.c \
785 vnet/pg/init.c \
786 vnet/pg/input.c \
787 vnet/pg/output.c \
788 vnet/pg/stream.c
789
790nobase_include_HEADERS += \
791 vnet/pg/pg.h \
792 vnet/pg/edit.h
793
Damjan Marion7cd468a2016-12-19 23:05:39 +0100794########################################
795# virtio
796########################################
797
798libvnet_la_SOURCES += \
799 vnet/devices/virtio/vhost-user.c \
800 vnet/devices/virtio/vhost_user_api.c
801
802nobase_include_HEADERS += \
803 vnet/devices/virtio/vhost-user.h \
804 vnet/devices/virtio/vhost_user.api.h
805
806API_FILES += vnet/devices/virtio/vhost_user.api
807
808########################################
809# ssvm ethernet
810########################################
811libvnet_la_SOURCES += \
812 vnet/devices/ssvm/ssvm_eth.c \
813 vnet/devices/ssvm/node.c
814
815nobase_include_HEADERS += \
816 vnet/devices/ssvm/ssvm_eth.h
817
818########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500819# session managmeent
820########################################
821
822libvnet_la_SOURCES += \
823 vnet/session/session.c \
824 vnet/session/node.c \
825 vnet/session/transport.c \
826 vnet/session/application.c \
827 vnet/session/session_cli.c \
828 vnet/session/hashes.c \
829 vnet/session/application_interface.c \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700830 vnet/session/segment_manager.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500831 vnet/session/session_api.c
832
833nobase_include_HEADERS += \
834 vnet/session/session.h \
835 vnet/session/application.h \
836 vnet/session/transport.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800837 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800838 vnet/session/session_debug.h \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700839 vnet/session/segment_manager.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800840 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500841
842API_FILES += vnet/session/session.api
843
844########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100845# Linux packet interface
846########################################
847
848libvnet_la_SOURCES += \
849 vnet/devices/af_packet/af_packet.c \
850 vnet/devices/af_packet/device.c \
851 vnet/devices/af_packet/node.c \
852 vnet/devices/af_packet/cli.c \
853 vnet/devices/af_packet/af_packet_api.c
854
855nobase_include_HEADERS += \
856 vnet/devices/af_packet/af_packet.h \
857 vnet/devices/af_packet/af_packet.api.h
858
859API_FILES += vnet/devices/af_packet/af_packet.api
860
861########################################
862# NETMAP interface
863########################################
864
865libvnet_la_SOURCES += \
866 vnet/devices/netmap/netmap.c \
867 vnet/devices/netmap/device.c \
868 vnet/devices/netmap/node.c \
869 vnet/devices/netmap/cli.c \
870 vnet/devices/netmap/netmap_api.c
871
872nobase_include_HEADERS += \
873 vnet/devices/netmap/netmap.h \
874 vnet/devices/netmap/netmap.api.h
875
876API_FILES += vnet/devices/netmap/netmap.api
877
878########################################
879# Driver feature graph arc support
880########################################
881
882libvnet_la_SOURCES += \
883 vnet/feature/feature.c \
884 vnet/feature/registration.c
885
886nobase_include_HEADERS += \
887 vnet/feature/feature.h
888
889########################################
890# Unix kernel related
891########################################
892
893# FIXME: vnet/unix/hgshm.c
894
895libvnet_la_SOURCES += \
896 vnet/unix/gdb_funcs.c \
897 vnet/unix/pcap.c \
898 vnet/unix/tap_api.c \
899 vnet/unix/tapcli.c \
900 vnet/unix/tuntap.c
901
902nobase_include_HEADERS += \
903 vnet/unix/pcap.h \
904 vnet/unix/tuntap.h \
905 vnet/unix/tap.api.h \
906 vnet/unix/tapcli.h
907
908API_FILES += vnet/unix/tap.api
909
910########################################
911# FIB
912########################################
913
914libvnet_la_SOURCES += \
915 vnet/fib/fib.c \
916 vnet/fib/fib_test.c \
917 vnet/fib/ip4_fib.c \
918 vnet/fib/ip6_fib.c \
919 vnet/fib/mpls_fib.c \
920 vnet/fib/fib_table.c \
921 vnet/fib/fib_walk.c \
922 vnet/fib/fib_types.c \
923 vnet/fib/fib_node.c \
924 vnet/fib/fib_node_list.c \
925 vnet/fib/fib_entry.c \
926 vnet/fib/fib_entry_src.c \
927 vnet/fib/fib_entry_src_rr.c \
928 vnet/fib/fib_entry_src_interface.c \
929 vnet/fib/fib_entry_src_default_route.c \
930 vnet/fib/fib_entry_src_special.c \
931 vnet/fib/fib_entry_src_api.c \
932 vnet/fib/fib_entry_src_adj.c \
933 vnet/fib/fib_entry_src_mpls.c \
934 vnet/fib/fib_entry_src_lisp.c \
935 vnet/fib/fib_entry_cover.c \
936 vnet/fib/fib_entry_delegate.c \
937 vnet/fib/fib_path_list.c \
938 vnet/fib/fib_path.c \
939 vnet/fib/fib_path_ext.c \
940 vnet/fib/fib_urpf_list.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700941 vnet/fib/fib_attached_export.c \
942 vnet/fib/fib_bfd.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100943
944nobase_include_HEADERS += \
945 vnet/fib/fib.h \
946 vnet/fib/fib_api.h \
947 vnet/fib/ip4_fib.h \
948 vnet/fib/ip6_fib.h \
949 vnet/fib/fib_types.h \
950 vnet/fib/fib_table.h \
951 vnet/fib/fib_node.h \
952 vnet/fib/fib_node_list.h \
953 vnet/fib/fib_entry.h \
954 vnet/fib/fib_entry_delegate.h
955
956########################################
957# ADJ
958########################################
959
960libvnet_la_SOURCES += \
961 vnet/adj/adj_nbr.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100962 vnet/adj/adj_glean.c \
963 vnet/adj/adj_midchain.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000964 vnet/adj/adj_mcast.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100965 vnet/adj/adj_l2.c \
Florin Corasce1b4c72017-01-26 14:25:34 -0800966 vnet/adj/adj_nsh.c \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800967 vnet/adj/adj.c \
Neale Ranns88fc83e2017-04-05 08:11:14 -0700968 vnet/adj/rewrite.c \
969 vnet/adj/adj_bfd.c \
970 vnet/adj/adj_delegate.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100971
972nobase_include_HEADERS += \
973 vnet/adj/adj.h \
974 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100975 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800976 vnet/adj/adj_nsh.h \
Neale Rannsfa5d1982017-02-20 14:19:51 -0800977 vnet/adj/adj_nbr.h \
978 vnet/adj/rewrite.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100979
980########################################
981# Data-Plane Objects
982########################################
983
984libvnet_la_SOURCES += \
985 vnet/dpo/dpo.c \
986 vnet/dpo/drop_dpo.c \
987 vnet/dpo/ip_null_dpo.c \
988 vnet/dpo/punt_dpo.c \
989 vnet/dpo/receive_dpo.c \
990 vnet/dpo/load_balance.c \
991 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000992 vnet/dpo/lookup_dpo.c \
993 vnet/dpo/classify_dpo.c \
994 vnet/dpo/replicate_dpo.c \
Neale Ranns0f26c5a2017-03-01 15:12:11 -0800995 vnet/dpo/interface_dpo.c \
996 vnet/dpo/mpls_disposition.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100997 vnet/dpo/mpls_label_dpo.c
998
999nobase_include_HEADERS += \
1000 vnet/dpo/load_balance.h \
1001 vnet/dpo/drop_dpo.h \
1002 vnet/dpo/lookup_dpo.h \
1003 vnet/dpo/punt_dpo.h \
1004 vnet/dpo/classify_dpo.h \
1005 vnet/dpo/receive_dpo.h \
1006 vnet/dpo/ip_null_dpo.h \
1007 vnet/dpo/dpo.h
1008
1009########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001010# Multicast FIB
1011########################################
1012
1013libvnet_la_SOURCES += \
1014 vnet/mfib/mfib_test.c \
1015 vnet/mfib/mfib_forward.c \
1016 vnet/mfib/ip4_mfib.c \
1017 vnet/mfib/ip6_mfib.c \
1018 vnet/mfib/mfib_types.c \
1019 vnet/mfib/mfib_signal.c \
1020 vnet/mfib/mfib_itf.c \
1021 vnet/mfib/mfib_entry.c \
1022 vnet/mfib/mfib_table.c
1023
1024nobase_include_HEADERS += \
1025 vnet/mfib/ip4_mfib.h \
1026 vnet/mfib/mfib_types.h \
1027 vnet/mfib/mfib_table.h
1028
1029########################################
1030# Utilities
1031########################################
1032
1033libvnet_la_SOURCES += \
1034 vnet/util/radix.c
1035
1036########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001037# Plugin client library
1038########################################
1039
Damjan Marion7cd468a2016-12-19 23:05:39 +01001040nobase_include_HEADERS += \
1041 vnet/plugin/plugin.h
1042
Damjan Marion7cd468a2016-12-19 23:05:39 +01001043pcap2pg_SOURCES = \
1044 vnet/unix/pcap2pg.c \
1045 vnet/unix/pcap.h
1046
1047pcap2pg_LDFLAGS = -static
1048pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1049
1050noinst_PROGRAMS += pcap2pg
1051
1052# vi:syntax=automake