blob: 3e73de8f21d9fd7400c6844b05d3117cb71c6e79 [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 \
22 libvlibapi.la \
23 libvlibmemory.la \
24 libvlibmemoryclient.la
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 += \
36 vnet/config.c \
37 vnet/devices/devices.c \
38 vnet/handoff.c \
39 vnet/interface.c \
40 vnet/interface_api.c \
41 vnet/interface_cli.c \
42 vnet/interface_format.c \
43 vnet/interface_output.c \
44 vnet/misc.c \
Neale Ranns2e7fbcc2017-03-15 04:22:25 -070045 vnet/replication.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +010046 vnet/rewrite.c
47
48nobase_include_HEADERS += \
49 vnet/api_errno.h \
50 vnet/buffer.h \
51 vnet/config.h \
52 vnet/devices/devices.h \
53 vnet/global_funcs.h \
54 vnet/handoff.h \
55 vnet/interface.h \
56 vnet/interface.api.h \
57 vnet/interface_funcs.h \
58 vnet/l3_types.h \
59 vnet/pipeline.h \
60 vnet/replication.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +010061 vnet/vnet.h \
62 vnet/vnet_all_api_h.h \
Gabriel Ganne5842c782017-01-30 13:44:04 +010063 vnet/vnet_msg_enum.h \
64 vnet/util/radix.h
Damjan Marion7cd468a2016-12-19 23:05:39 +010065
66API_FILES += vnet/interface.api
67
68########################################
69# Policer infra
70########################################
71
72libvnet_la_SOURCES += \
73 vnet/policer/node_funcs.c \
74 vnet/policer/policer.c \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010075 vnet/policer/xlate.c \
76 vnet/policer/policer_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010077
78nobase_include_HEADERS += \
79 vnet/policer/police.h \
80 vnet/policer/policer.h \
Pavel Kotucekd9aad292017-01-25 08:45:38 +010081 vnet/policer/xlate.h \
82 vnet/policer/policer.api.h
83
84API_FILES += vnet/policer/policer.api
Damjan Marion7cd468a2016-12-19 23:05:39 +010085
86########################################
87# Cop - junk filter
88########################################
89
90libvnet_la_SOURCES += \
91 vnet/cop/cop.c \
92 vnet/cop/node1.c \
93 vnet/cop/ip4_whitelist.c \
Pavel Kotucek884cf262017-01-25 08:27:15 +010094 vnet/cop/ip6_whitelist.c \
95 vnet/cop/cop_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +010096
97nobase_include_HEADERS += \
Pavel Kotucek884cf262017-01-25 08:27:15 +010098 vnet/cop/cop.h \
99 vnet/cop/cop.api.h
100
101API_FILES += vnet/cop/cop.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100102
103########################################
104# Layer 2 protocols go here
105########################################
106
107########################################
108# Layer 2 protocol: Ethernet
109########################################
110libvnet_la_SOURCES += \
111 vnet/ethernet/arp.c \
112 vnet/ethernet/format.c \
113 vnet/ethernet/init.c \
114 vnet/ethernet/interface.c \
115 vnet/ethernet/node.c \
Damjan Marion374e2c52017-03-09 20:38:15 +0100116 vnet/ethernet/pg.c \
117 vnet/ethernet/sfp.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100118
119nobase_include_HEADERS += \
120 vnet/ethernet/arp_packet.h \
121 vnet/ethernet/error.def \
122 vnet/ethernet/ethernet.h \
123 vnet/ethernet/packet.h \
Damjan Marion374e2c52017-03-09 20:38:15 +0100124 vnet/ethernet/types.def \
125 vnet/ethernet/sfp.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100126
127########################################
128# Layer 2 protocol: Ethernet bridging
129########################################
130libvnet_la_SOURCES += \
131 vnet/l2/feat_bitmap.c \
132 vnet/l2/l2_api.c \
133 vnet/l2/l2_bd.c \
134 vnet/l2/l2_bvi.c \
135 vnet/l2/l2_input_classify.c \
136 vnet/l2/l2_output_classify.c \
137 vnet/l2/l2_efp_filter.c \
138 vnet/l2/l2_fib.c \
139 vnet/l2/l2_flood.c \
140 vnet/l2/l2_fwd.c \
141 vnet/l2/l2_input_acl.c \
142 vnet/l2/l2_input.c \
143 vnet/l2/l2_input_vtr.c \
144 vnet/l2/l2_learn.c \
145 vnet/l2/l2_output_acl.c \
146 vnet/l2/l2_output.c \
147 vnet/l2/l2_patch.c \
148 vnet/l2/l2_rw.c \
149 vnet/l2/l2_vtr.c \
150 vnet/l2/l2_xcrw.c
151
152nobase_include_HEADERS += \
153 vnet/l2/feat_bitmap.h \
154 vnet/l2/l2_input.h \
155 vnet/l2/l2_output.h \
156 vnet/l2/l2_vtr.h \
157 vnet/l2/l2_input_vtr.h \
158 vnet/l2/l2_efp_filter.h \
159 vnet/l2/l2_fwd.h \
160 vnet/l2/l2_bd.h \
161 vnet/l2/l2_bvi.h \
162 vnet/l2/l2_flood.h \
163 vnet/l2/l2_fib.h \
164 vnet/l2/l2_rw.h \
165 vnet/l2/l2_xcrw.h \
166 vnet/l2/l2_classify.h \
167 vnet/l2/l2.api.h
168
169API_FILES += vnet/l2/l2.api
170
171########################################
172# Layer 2 protocol: SRP
173########################################
174libvnet_la_SOURCES += \
175 vnet/srp/format.c \
176 vnet/srp/interface.c \
177 vnet/srp/node.c \
178 vnet/srp/pg.c
179
180nobase_include_HEADERS += \
181 vnet/srp/packet.h \
182 vnet/srp/srp.h
183
184########################################
185# Layer 2 protocol: PPP
186########################################
187libvnet_la_SOURCES += \
188 vnet/ppp/node.c \
189 vnet/ppp/pg.c \
190 vnet/ppp/ppp.c
191
192nobase_include_HEADERS += \
193 vnet/ppp/error.def \
194 vnet/ppp/ppp.h \
195 vnet/ppp/packet.h
196
197########################################
198# Layer 2 protocol: HDLC
199########################################
200libvnet_la_SOURCES += \
201 vnet/hdlc/node.c \
202 vnet/hdlc/pg.c \
203 vnet/hdlc/hdlc.c
204
205nobase_include_HEADERS += \
206 vnet/hdlc/error.def \
207 vnet/hdlc/hdlc.h \
208 vnet/hdlc/packet.h
209
210########################################
211# Layer 2 protocol: LLC
212########################################
213libvnet_la_SOURCES += \
214 vnet/llc/llc.c \
215 vnet/llc/node.c \
216 vnet/llc/pg.c
217
218nobase_include_HEADERS += \
219 vnet/llc/llc.h
220
221########################################
222# Layer 2 protocol: SNAP
223########################################
224libvnet_la_SOURCES += \
225 vnet/snap/snap.c \
226 vnet/snap/node.c \
227 vnet/snap/pg.c
228
229nobase_include_HEADERS += \
230 vnet/snap/snap.h
231
232########################################
233# Layer 2 / vxlan
234########################################
235libvnet_la_SOURCES += \
236 vnet/vxlan/vxlan.c \
237 vnet/vxlan/encap.c \
238 vnet/vxlan/decap.c \
239 vnet/vxlan/vxlan_api.c
240
241nobase_include_HEADERS += \
242 vnet/vxlan/vxlan.h \
243 vnet/vxlan/vxlan_packet.h \
244 vnet/vxlan/vxlan_error.def \
245 vnet/vxlan/vxlan.api.h
246
247API_FILES += vnet/vxlan/vxlan.api
248
249########################################
250# Layer 2 / CDP
251########################################
252libvnet_la_SOURCES += \
253 vnet/cdp/cdp_input.c \
254 vnet/cdp/cdp_node.c \
255 vnet/cdp/cdp_periodic.c
256
257nobase_include_HEADERS += \
258 vnet/cdp/cdp_protocol.h
259
260########################################
261# Layer 2 / LLDP
262########################################
263libvnet_la_SOURCES += \
264 vnet/lldp/lldp_input.c \
265 vnet/lldp/lldp_node.c \
266 vnet/lldp/lldp_output.c \
267 vnet/lldp/lldp_cli.c
268
269nobase_include_HEADERS += \
270 vnet/lldp/lldp_protocol.h
271
272########################################
273# Layer 2/3 "classify"
274########################################
275libvnet_la_SOURCES += \
276 vnet/classify/vnet_classify.c \
277 vnet/classify/ip_classify.c \
278 vnet/classify/input_acl.c \
279 vnet/classify/policer_classify.c \
280 vnet/classify/flow_classify.c \
281 vnet/classify/flow_classify_node.c \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100282 vnet/classify/vnet_classify.h \
283 vnet/classify/classify_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100284
285nobase_include_HEADERS += \
286 vnet/classify/vnet_classify.h \
287 vnet/classify/input_acl.h \
288 vnet/classify/policer_classify.h \
Pavel Kotucekd2c97d92017-01-24 10:58:12 +0100289 vnet/classify/flow_classify.h \
290 vnet/classify/classify.api.h
291
292API_FILES += vnet/classify/classify.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100293
294########################################
295# Layer 3 protocols go here
296########################################
297
298########################################
299# Layer 3 protocol: IP v4/v6
300########################################
301libvnet_la_SOURCES += \
302 vnet/ip/format.c \
303 vnet/ip/icmp4.c \
304 vnet/ip/icmp6.c \
305 vnet/ip/ip46_cli.c \
306 vnet/ip/ip4_format.c \
307 vnet/ip/ip4_forward.c \
308 vnet/ip/ip4_input.c \
309 vnet/ip/ip4_mtrie.c \
310 vnet/ip/ip4_pg.c \
311 vnet/ip/ip4_source_and_port_range_check.c \
312 vnet/ip/ip4_source_check.c \
313 vnet/ip/ip6_format.c \
314 vnet/ip/ip6_forward.c \
315 vnet/ip/ip6_hop_by_hop.c \
316 vnet/ip/ip6_input.c \
317 vnet/ip/ip6_neighbor.c \
318 vnet/ip/ip6_pg.c \
319 vnet/ip/ip_api.c \
320 vnet/ip/ip_checksum.c \
321 vnet/ip/ip_frag.c \
322 vnet/ip/ip.h \
323 vnet/ip/ip_init.c \
324 vnet/ip/ip_input_acl.c \
325 vnet/ip/lookup.c \
326 vnet/ip/ping.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500327 vnet/ip/punt.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100328
329nobase_include_HEADERS += \
330 vnet/ip/format.h \
331 vnet/ip/icmp46_packet.h \
332 vnet/ip/icmp4.h \
333 vnet/ip/icmp6.h \
334 vnet/ip/igmp_packet.h \
335 vnet/ip/ip.api.h \
336 vnet/ip/ip4_error.h \
337 vnet/ip/ip4.h \
338 vnet/ip/ip4_mtrie.h \
339 vnet/ip/ip4_packet.h \
340 vnet/ip/ip6_error.h \
341 vnet/ip/ip6.h \
342 vnet/ip/ip6_hop_by_hop.h \
343 vnet/ip/ip6_hop_by_hop_packet.h \
344 vnet/ip/ip6_packet.h \
345 vnet/ip/ip6_neighbor.h \
346 vnet/ip/ip.h \
347 vnet/ip/ip_packet.h \
348 vnet/ip/ip_source_and_port_range_check.h \
349 vnet/ip/lookup.h \
350 vnet/ip/ports.def \
351 vnet/ip/protocols.def \
352 vnet/ip/punt_error.def \
Dave Barach68b0fb02017-02-28 15:15:56 -0500353 vnet/ip/punt.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100354
355API_FILES += vnet/ip/ip.api
356
357########################################
358# Bidirectional Forwarding Detection
359########################################
360
361nobase_include_HEADERS += \
362 vnet/bfd/bfd_protocol.h \
363 vnet/bfd/bfd_main.h \
364 vnet/bfd/bfd_api.h \
365 vnet/bfd/bfd_udp.h \
366 vnet/bfd/bfd.api.h
367
368libvnet_la_SOURCES += \
369 vnet/bfd/bfd_api.h \
370 vnet/bfd/bfd_udp.c \
371 vnet/bfd/bfd_main.c \
372 vnet/bfd/bfd_protocol.c \
Klement Sekera73884482017-02-23 09:26:30 +0100373 vnet/bfd/bfd_cli.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100374 vnet/bfd/bfd_api.c
375
376API_FILES += vnet/bfd/bfd.api
377
378########################################
379# Layer 3 protocol: IPSec
380########################################
Damjan Mariona9a951f2017-01-16 22:06:10 +0100381if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100382libvnet_la_SOURCES += \
383 vnet/ipsec/ipsec.c \
384 vnet/ipsec/ipsec_cli.c \
385 vnet/ipsec/ipsec_format.c \
386 vnet/ipsec/ipsec_input.c \
387 vnet/ipsec/ipsec_if.c \
388 vnet/ipsec/ipsec_if_in.c \
389 vnet/ipsec/ipsec_if_out.c \
390 vnet/ipsec/esp_encrypt.c \
391 vnet/ipsec/esp_decrypt.c \
392 vnet/ipsec/ikev2.c \
393 vnet/ipsec/ikev2_crypto.c \
394 vnet/ipsec/ikev2_cli.c \
395 vnet/ipsec/ikev2_payload.c \
396 vnet/ipsec/ikev2_format.c \
397 vnet/ipsec/ipsec_api.c
398
399API_FILES += vnet/ipsec/ipsec.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100400endif
401
402libvnet_la_SOURCES += \
403 vnet/ipsec/ipsec_output.c
404
405nobase_include_HEADERS += \
406 vnet/ipsec/ipsec.h \
407 vnet/ipsec/esp.h \
408 vnet/ipsec/ikev2.h \
409 vnet/ipsec/ikev2_priv.h \
410 vnet/ipsec/ipsec.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100411
412########################################
413# Layer 3 protocol: osi
414########################################
415libvnet_la_SOURCES += \
416 vnet/osi/node.c \
417 vnet/osi/osi.c \
418 vnet/osi/pg.c
419
420nobase_include_HEADERS += \
421 vnet/osi/osi.h
422
423########################################
424# Layer 3 protocol: MAP
425########################################
426libvnet_la_SOURCES += \
427 vnet/map/map.c \
428 vnet/map/map_dpo.c \
429 vnet/map/ip4_map.c \
430 vnet/map/ip6_map.c \
431 vnet/map/ip4_map_t.c \
432 vnet/map/ip6_map_t.c \
433 vnet/map/map_api.c
434
435nobase_include_HEADERS += \
436 vnet/map/map.h \
437 vnet/map/map_dpo.h \
438 vnet/map/map.api.h
439
440API_FILES += vnet/map/map.api
441
442if ENABLE_TESTS
443TESTS += test_map
444test_map_SOURCES = \
445 vnet/map/test.c
446test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
447
448test_map_LDADD = libvnet.la libvppinfra.la libvlib.la \
Damjan Marion0eca04d2017-01-03 20:11:35 +0100449 -lpthread -lvlibmemory -lvlibapi \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100450 -ldl -lsvm -lrt
451
452test_map_LDFLAGS = -static
453endif
454
Dave Barach68b0fb02017-02-28 15:15:56 -0500455########################################
456# Layer 4 protocol: tcp
457########################################
458libvnet_la_SOURCES += \
459 vnet/tcp/tcp_format.c \
460 vnet/tcp/tcp_pg.c \
461 vnet/tcp/tcp_syn_filter4.c \
462 vnet/tcp/tcp_output.c \
463 vnet/tcp/tcp_input.c \
464 vnet/tcp/tcp_newreno.c \
Florin Corase04c2992017-03-01 08:17:34 -0800465 vnet/tcp/builtin_server.c \
Dave Barach68b0fb02017-02-28 15:15:56 -0500466 vnet/tcp/tcp.c
467
468nobase_include_HEADERS += \
469 vnet/tcp/tcp_packet.h \
470 vnet/tcp/tcp_timer.h \
Florin Corase69f4952017-03-07 10:06:24 -0800471 vnet/tcp/tcp_debug.h \
Dave Barach68b0fb02017-02-28 15:15:56 -0500472 vnet/tcp/tcp.h
473
474########################################
475# Layer 4 protocol: udp
476########################################
477libvnet_la_SOURCES += \
478 vnet/udp/udp.c \
479 vnet/udp/udp_input.c \
480 vnet/udp/builtin_server.c \
481 vnet/udp/udp_format.c \
482 vnet/udp/udp_local.c \
483 vnet/udp/udp_pg.c
484
485nobase_include_HEADERS += \
486 vnet/udp/udp_error.def \
487 vnet/udp/udp.h \
488 vnet/udp/udp_packet.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100489
490########################################
491# Tunnel protocol: gre
492########################################
493libvnet_la_SOURCES += \
494 vnet/gre/gre.c \
495 vnet/gre/node.c \
496 vnet/gre/interface.c \
497 vnet/gre/pg.c \
498 vnet/gre/gre_api.c
499
500nobase_include_HEADERS += \
501 vnet/gre/gre.h \
502 vnet/gre/packet.h \
503 vnet/gre/error.def \
504 vnet/gre/gre.api.h
505
506API_FILES += vnet/gre/gre.api
507
508########################################
509# Tunnel protocol: l2tpv3
510########################################
511libvnet_la_SOURCES += \
512 vnet/l2tp/l2tp.c \
513 vnet/l2tp/encap.c \
514 vnet/l2tp/decap.c \
515 vnet/l2tp/pg.c \
516 vnet/l2tp/l2tp_api.c
517
518nobase_include_HEADERS += \
519 vnet/l2tp/l2tp.h \
520 vnet/l2tp/packet.h \
521 vnet/l2tp/l2tp.api.h
522
523API_FILES += vnet/l2tp/l2tp.api
524
525########################################
526# Tunnel protocol: gre+mpls
527########################################
528libvnet_la_SOURCES += \
529 vnet/mpls/mpls.c \
530 vnet/mpls/mpls_lookup.c \
531 vnet/mpls/mpls_output.c \
532 vnet/mpls/mpls_features.c \
Neale Ranns696e88d2017-03-16 07:34:55 -0400533 vnet/mpls/mpls_input.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100534 vnet/mpls/interface.c \
535 vnet/mpls/mpls_tunnel.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100536 vnet/mpls/pg.c \
537 vnet/mpls/mpls_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100538
539nobase_include_HEADERS += \
540 vnet/mpls/mpls.h \
541 vnet/mpls/mpls_types.h \
542 vnet/mpls/mpls_tunnel.h \
543 vnet/mpls/packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100544 vnet/mpls/error.def \
545 vnet/mpls/mpls.api.h
Damjan Marion7cd468a2016-12-19 23:05:39 +0100546
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100547API_FILES += vnet/mpls/mpls.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100548
549########################################
550# Tunnel protocol: vxlan-gpe
551########################################
552
553libvnet_la_SOURCES += \
554 vnet/vxlan-gpe/vxlan_gpe.c \
555 vnet/vxlan-gpe/encap.c \
556 vnet/vxlan-gpe/decap.c \
557 vnet/vxlan-gpe/vxlan_gpe_api.c
558
559nobase_include_HEADERS += \
560 vnet/vxlan-gpe/vxlan_gpe.h \
561 vnet/vxlan-gpe/vxlan_gpe_packet.h \
562 vnet/vxlan-gpe/vxlan_gpe_error.def \
563 vnet/vxlan-gpe/vxlan_gpe.api.h
564
565API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
566
567########################################
568# Tunnel protocol: ipsec+gre
569########################################
570libvnet_la_SOURCES += \
571 vnet/ipsec-gre/ipsec_gre.c \
572 vnet/ipsec-gre/node.c \
573 vnet/ipsec-gre/interface.c \
574 vnet/ipsec-gre/ipsec_gre_api.c
575
576nobase_include_HEADERS += \
577 vnet/ipsec-gre/ipsec_gre.h \
578 vnet/ipsec-gre/error.def \
579 vnet/ipsec-gre/ipsec_gre.api.h
580
581API_FILES += vnet/ipsec-gre/ipsec_gre.api
582
583########################################
584# LISP control plane: lisp-cp
585########################################
586
587libvnet_la_SOURCES += \
588 vnet/lisp-cp/lisp_types.c \
589 vnet/lisp-cp/lisp_cp_dpo.c \
590 vnet/lisp-cp/control.c \
591 vnet/lisp-cp/gid_dictionary.c \
592 vnet/lisp-cp/lisp_msg_serdes.c \
593 vnet/lisp-cp/packets.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100594 vnet/lisp-cp/one_cli.c \
Florin Corasf3dc11a2017-01-24 03:13:43 -0800595 vnet/lisp-cp/lisp_cli.c \
Filip Tehlar694396d2017-02-17 14:29:11 +0100596 vnet/lisp-cp/one_api.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100597 vnet/lisp-cp/lisp_api.c
598
599nobase_include_HEADERS += \
600 vnet/lisp-cp/lisp_types.h \
601 vnet/lisp-cp/packets.h \
602 vnet/lisp-cp/gid_dictionary.h \
603 vnet/lisp-cp/lisp_cp_messages.h \
604 vnet/lisp-cp/lisp_msg_serdes.h \
605 vnet/lisp-cp/control.h \
Filip Tehlar694396d2017-02-17 14:29:11 +0100606 vnet/lisp-cp/one.api.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100607 vnet/lisp-cp/lisp.api.h
608
609API_FILES += vnet/lisp-cp/lisp.api
Filip Tehlar694396d2017-02-17 14:29:11 +0100610API_FILES += vnet/lisp-cp/one.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100611
612if ENABLE_TESTS
613LDS = \
614 libvppinfra.la \
615 libvnet.la \
616 libvlib.la \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100617 libsvm.la \
618 libsvmdb.la \
619 libvlibapi.la \
620 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
668if ENABLE_TESTS
669TESTS += test_test
670
671test_test_SOURCES = tests/vnet/lisp-gpe/test.c
672
673test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
674
675test_test_LDADD = $(LIBOBJS)
676
677noinst_PROGRAMS += $(TESTS)
678check_PROGRAMS += $(TESTS)
679endif
680
681########################################
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 Mariona9a951f2017-01-16 22:06:10 +0100714if WITH_LIBSSL
Damjan Marion7cd468a2016-12-19 23:05:39 +0100715libvnet_la_SOURCES += \
Pablo Camarillofb380952016-12-07 18:34:18 +0100716 vnet/sr/sr.c \
717 vnet/sr/sr_localsid.c \
718 vnet/sr/sr_policy_rewrite.c \
719 vnet/sr/sr_steering.c \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100720 vnet/sr/sr_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100721endif
722
723nobase_include_HEADERS += \
724 vnet/sr/sr_packet.h \
Pavel Kotucek0f971d82017-01-03 10:48:54 +0100725 vnet/sr/sr.h \
726 vnet/sr/sr.api.h
727
728API_FILES += vnet/sr/sr.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100729
730########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100731# IPFIX / netflow v10
732########################################
733libvnet_la_SOURCES += \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100734 vnet/flow/flow_report.c \
735 vnet/flow/flow_api.c
Damjan Marion7cd468a2016-12-19 23:05:39 +0100736
737nobase_include_HEADERS += \
738 vnet/flow/flow_report.h \
739 vnet/flow/ipfix_info_elements.h \
Pavel Kotucekeb9e6662017-01-24 13:40:26 +0100740 vnet/flow/ipfix_packet.h \
741 vnet/flow/flow.api.h
742
743API_FILES += vnet/flow/flow.api
Damjan Marion7cd468a2016-12-19 23:05:39 +0100744
745########################################
746# IPFIX classify code
747########################################
748
749libvnet_la_SOURCES += \
750 vnet/flow/flow_report_classify.c
751
752nobase_include_HEADERS += \
753 vnet/flow/flow_report_classify.h
754
755########################################
756# lawful intercept
757########################################
758
759libvnet_la_SOURCES += \
760 vnet/lawful-intercept/lawful_intercept.c \
761 vnet/lawful-intercept/node.c
762
763nobase_include_HEADERS += \
764 vnet/lawful-intercept/lawful_intercept.h
765
766########################################
767# SPAN (port mirroring)
768########################################
769
770libvnet_la_SOURCES += \
771 vnet/span/span_api.c \
772 vnet/span/span.c \
773 vnet/span/node.c
774
775nobase_include_HEADERS += \
776 vnet/span/span.api.h \
777 vnet/span/span.h
778
779API_FILES += vnet/span/span.api
780
781########################################
782# Packet generator
783########################################
784
785libvnet_la_SOURCES += \
786 vnet/pg/cli.c \
787 vnet/pg/edit.c \
788 vnet/pg/init.c \
789 vnet/pg/input.c \
790 vnet/pg/output.c \
791 vnet/pg/stream.c
792
793nobase_include_HEADERS += \
794 vnet/pg/pg.h \
795 vnet/pg/edit.h
796
Damjan Marion7cd468a2016-12-19 23:05:39 +0100797########################################
798# virtio
799########################################
800
801libvnet_la_SOURCES += \
802 vnet/devices/virtio/vhost-user.c \
803 vnet/devices/virtio/vhost_user_api.c
804
805nobase_include_HEADERS += \
806 vnet/devices/virtio/vhost-user.h \
807 vnet/devices/virtio/vhost_user.api.h
808
809API_FILES += vnet/devices/virtio/vhost_user.api
810
811########################################
812# ssvm ethernet
813########################################
814libvnet_la_SOURCES += \
815 vnet/devices/ssvm/ssvm_eth.c \
816 vnet/devices/ssvm/node.c
817
818nobase_include_HEADERS += \
819 vnet/devices/ssvm/ssvm_eth.h
820
821########################################
Dave Barach68b0fb02017-02-28 15:15:56 -0500822# session managmeent
823########################################
824
825libvnet_la_SOURCES += \
826 vnet/session/session.c \
827 vnet/session/node.c \
828 vnet/session/transport.c \
829 vnet/session/application.c \
830 vnet/session/session_cli.c \
831 vnet/session/hashes.c \
832 vnet/session/application_interface.c \
833 vnet/session/session_api.c
834
835nobase_include_HEADERS += \
836 vnet/session/session.h \
837 vnet/session/application.h \
838 vnet/session/transport.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800839 vnet/session/application_interface.h \
Florin Corase69f4952017-03-07 10:06:24 -0800840 vnet/session/session_debug.h \
Alexander Popovsky (apopovsk)6f6f52a2017-03-03 16:06:26 -0800841 vnet/session/session.api.h
Dave Barach68b0fb02017-02-28 15:15:56 -0500842
843API_FILES += vnet/session/session.api
844
845########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +0100846# Linux packet interface
847########################################
848
849libvnet_la_SOURCES += \
850 vnet/devices/af_packet/af_packet.c \
851 vnet/devices/af_packet/device.c \
852 vnet/devices/af_packet/node.c \
853 vnet/devices/af_packet/cli.c \
854 vnet/devices/af_packet/af_packet_api.c
855
856nobase_include_HEADERS += \
857 vnet/devices/af_packet/af_packet.h \
858 vnet/devices/af_packet/af_packet.api.h
859
860API_FILES += vnet/devices/af_packet/af_packet.api
861
862########################################
863# NETMAP interface
864########################################
865
866libvnet_la_SOURCES += \
867 vnet/devices/netmap/netmap.c \
868 vnet/devices/netmap/device.c \
869 vnet/devices/netmap/node.c \
870 vnet/devices/netmap/cli.c \
871 vnet/devices/netmap/netmap_api.c
872
873nobase_include_HEADERS += \
874 vnet/devices/netmap/netmap.h \
875 vnet/devices/netmap/netmap.api.h
876
877API_FILES += vnet/devices/netmap/netmap.api
878
879########################################
880# Driver feature graph arc support
881########################################
882
883libvnet_la_SOURCES += \
884 vnet/feature/feature.c \
885 vnet/feature/registration.c
886
887nobase_include_HEADERS += \
888 vnet/feature/feature.h
889
890########################################
891# Unix kernel related
892########################################
893
894# FIXME: vnet/unix/hgshm.c
895
896libvnet_la_SOURCES += \
897 vnet/unix/gdb_funcs.c \
898 vnet/unix/pcap.c \
899 vnet/unix/tap_api.c \
900 vnet/unix/tapcli.c \
901 vnet/unix/tuntap.c
902
903nobase_include_HEADERS += \
904 vnet/unix/pcap.h \
905 vnet/unix/tuntap.h \
906 vnet/unix/tap.api.h \
907 vnet/unix/tapcli.h
908
909API_FILES += vnet/unix/tap.api
910
911########################################
912# FIB
913########################################
914
915libvnet_la_SOURCES += \
916 vnet/fib/fib.c \
917 vnet/fib/fib_test.c \
918 vnet/fib/ip4_fib.c \
919 vnet/fib/ip6_fib.c \
920 vnet/fib/mpls_fib.c \
921 vnet/fib/fib_table.c \
922 vnet/fib/fib_walk.c \
923 vnet/fib/fib_types.c \
924 vnet/fib/fib_node.c \
925 vnet/fib/fib_node_list.c \
926 vnet/fib/fib_entry.c \
927 vnet/fib/fib_entry_src.c \
928 vnet/fib/fib_entry_src_rr.c \
929 vnet/fib/fib_entry_src_interface.c \
930 vnet/fib/fib_entry_src_default_route.c \
931 vnet/fib/fib_entry_src_special.c \
932 vnet/fib/fib_entry_src_api.c \
933 vnet/fib/fib_entry_src_adj.c \
934 vnet/fib/fib_entry_src_mpls.c \
935 vnet/fib/fib_entry_src_lisp.c \
936 vnet/fib/fib_entry_cover.c \
937 vnet/fib/fib_entry_delegate.c \
938 vnet/fib/fib_path_list.c \
939 vnet/fib/fib_path.c \
940 vnet/fib/fib_path_ext.c \
941 vnet/fib/fib_urpf_list.c \
942 vnet/fib/fib_attached_export.c
943
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 \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100967 vnet/adj/adj.c
968
969nobase_include_HEADERS += \
970 vnet/adj/adj.h \
971 vnet/adj/adj_types.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100972 vnet/adj/adj_glean.h \
Florin Corasce1b4c72017-01-26 14:25:34 -0800973 vnet/adj/adj_nsh.h \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100974 vnet/adj/adj_nbr.h
975
976########################################
977# Data-Plane Objects
978########################################
979
980libvnet_la_SOURCES += \
981 vnet/dpo/dpo.c \
982 vnet/dpo/drop_dpo.c \
983 vnet/dpo/ip_null_dpo.c \
984 vnet/dpo/punt_dpo.c \
985 vnet/dpo/receive_dpo.c \
986 vnet/dpo/load_balance.c \
987 vnet/dpo/load_balance_map.c \
Neale Ranns32e1c012016-11-22 17:07:28 +0000988 vnet/dpo/lookup_dpo.c \
989 vnet/dpo/classify_dpo.c \
990 vnet/dpo/replicate_dpo.c \
Damjan Marion7cd468a2016-12-19 23:05:39 +0100991 vnet/dpo/mpls_label_dpo.c
992
993nobase_include_HEADERS += \
994 vnet/dpo/load_balance.h \
995 vnet/dpo/drop_dpo.h \
996 vnet/dpo/lookup_dpo.h \
997 vnet/dpo/punt_dpo.h \
998 vnet/dpo/classify_dpo.h \
999 vnet/dpo/receive_dpo.h \
1000 vnet/dpo/ip_null_dpo.h \
1001 vnet/dpo/dpo.h
1002
1003########################################
Neale Ranns32e1c012016-11-22 17:07:28 +00001004# Multicast FIB
1005########################################
1006
1007libvnet_la_SOURCES += \
1008 vnet/mfib/mfib_test.c \
1009 vnet/mfib/mfib_forward.c \
1010 vnet/mfib/ip4_mfib.c \
1011 vnet/mfib/ip6_mfib.c \
1012 vnet/mfib/mfib_types.c \
1013 vnet/mfib/mfib_signal.c \
1014 vnet/mfib/mfib_itf.c \
1015 vnet/mfib/mfib_entry.c \
1016 vnet/mfib/mfib_table.c
1017
1018nobase_include_HEADERS += \
1019 vnet/mfib/ip4_mfib.h \
1020 vnet/mfib/mfib_types.h \
1021 vnet/mfib/mfib_table.h
1022
1023########################################
1024# Utilities
1025########################################
1026
1027libvnet_la_SOURCES += \
1028 vnet/util/radix.c
1029
1030########################################
Damjan Marion7cd468a2016-12-19 23:05:39 +01001031# Plugin client library
1032########################################
1033
Damjan Marion7cd468a2016-12-19 23:05:39 +01001034nobase_include_HEADERS += \
1035 vnet/plugin/plugin.h
1036
Damjan Marion7cd468a2016-12-19 23:05:39 +01001037pcap2pg_SOURCES = \
1038 vnet/unix/pcap2pg.c \
1039 vnet/unix/pcap.h
1040
1041pcap2pg_LDFLAGS = -static
1042pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1043
1044noinst_PROGRAMS += pcap2pg
1045
1046# vi:syntax=automake