blob: f53a61bfd4442cb669452da138ad1bca445eb780 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# 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
14AUTOMAKE_OPTIONS = foreign subdir-objects
15
Neale Ranns0bfe5d82016-08-25 15:29:12 +010016AM_CFLAGS = -Wall -Werror @DPDK@ @IPSEC@ @IPV6SR@
Ed Warnickecb9cada2015-12-08 15:45:58 -070017
18libvnet_la_SOURCES =
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -040019libvnetplugin_la_SOURCES =
Ed Warnickecb9cada2015-12-08 15:45:58 -070020nobase_include_HEADERS =
Dave Barach4e281a42015-12-14 11:13:29 -050021noinst_PROGRAMS =
Filip Tehlar254b0362016-04-07 10:04:34 +020022TESTS =
Ed Warnickecb9cada2015-12-08 15:45:58 -070023
Ole Troand575e692016-08-25 12:26:47 +020024dpdk_libs =
25if WITH_DPDK
26dpdk_libs += -l:libdpdk.a
27endif
28
Ed Warnickecb9cada2015-12-08 15:45:58 -070029########################################
30# Generic stuff
31########################################
32libvnet_la_SOURCES += \
33 vnet/config.c \
Damjan Marion0247b462016-06-08 01:37:11 +020034 vnet/handoff.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070035 vnet/interface.c \
36 vnet/interface_cli.c \
37 vnet/interface_format.c \
38 vnet/interface_output.c \
39 vnet/misc.c \
40 vnet/replication.c \
41 vnet/rewrite.c
42
43nobase_include_HEADERS += \
44 vnet/api_errno.h \
45 vnet/buffer.h \
46 vnet/config.h \
Damjan Marion8bdc63b2016-11-02 14:48:21 +010047 vnet/devices/devices.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070048 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020049 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070050 vnet/interface.h \
51 vnet/interface_funcs.h \
52 vnet/l3_types.h \
53 vnet/pipeline.h \
54 vnet/replication.h \
55 vnet/rewrite.h \
56 vnet/vnet.h
57
58########################################
59# Policer infra
60########################################
61
62libvnet_la_SOURCES += \
63 vnet/policer/node_funcs.c \
64 vnet/policer/policer.c \
65 vnet/policer/xlate.c
66
67nobase_include_HEADERS += \
68 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070069 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070070 vnet/policer/xlate.h
71
Dave Barachc07bf5d2016-02-17 17:52:26 -050072########################################
73# Cop - junk filter
74########################################
75
76libvnet_la_SOURCES += \
77 vnet/cop/cop.c \
78 vnet/cop/node1.c \
79 vnet/cop/ip4_whitelist.c \
80 vnet/cop/ip6_whitelist.c
81
82nobase_include_HEADERS += \
83 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070084
85########################################
86# Layer 2 protocols go here
87########################################
88
89########################################
90# Layer 2 protocol: Ethernet
91########################################
92libvnet_la_SOURCES += \
93 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070094 vnet/ethernet/format.c \
95 vnet/ethernet/init.c \
96 vnet/ethernet/interface.c \
97 vnet/ethernet/node.c \
98 vnet/ethernet/pg.c
99
100nobase_include_HEADERS += \
101 vnet/ethernet/arp_packet.h \
102 vnet/ethernet/error.def \
103 vnet/ethernet/ethernet.h \
104 vnet/ethernet/packet.h \
105 vnet/ethernet/types.def
106
107########################################
108# Layer 2 protocol: Ethernet bridging
109########################################
110libvnet_la_SOURCES += \
111 vnet/l2/feat_bitmap.c \
112 vnet/l2/l2_bd.c \
113 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400114 vnet/l2/l2_input_classify.c \
115 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700116 vnet/l2/l2_efp_filter.c \
117 vnet/l2/l2_fib.c \
118 vnet/l2/l2_flood.c \
119 vnet/l2/l2_fwd.c \
120 vnet/l2/l2_input_acl.c \
121 vnet/l2/l2_input.c \
122 vnet/l2/l2_input_vtr.c \
123 vnet/l2/l2_learn.c \
124 vnet/l2/l2_output_acl.c \
125 vnet/l2/l2_output.c \
126 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000127 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700128 vnet/l2/l2_vtr.c \
129 vnet/l2/l2_xcrw.c
130
131nobase_include_HEADERS += \
132 vnet/l2/feat_bitmap.h \
133 vnet/l2/l2_input.h \
134 vnet/l2/l2_output.h \
135 vnet/l2/l2_vtr.h \
136 vnet/l2/l2_input_vtr.h \
137 vnet/l2/l2_efp_filter.h \
138 vnet/l2/l2_fwd.h \
139 vnet/l2/l2_bd.h \
140 vnet/l2/l2_bvi.h \
141 vnet/l2/l2_flood.h \
142 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000143 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700144 vnet/l2/l2_xcrw.h \
145 vnet/l2/l2_classify.h
146
147########################################
148# Layer 2 protocol: SRP
149########################################
150libvnet_la_SOURCES += \
151 vnet/srp/format.c \
152 vnet/srp/interface.c \
153 vnet/srp/node.c \
154 vnet/srp/pg.c
155
156nobase_include_HEADERS += \
157 vnet/srp/packet.h \
158 vnet/srp/srp.h
159
160########################################
161# Layer 2 protocol: PPP
162########################################
163libvnet_la_SOURCES += \
164 vnet/ppp/node.c \
165 vnet/ppp/pg.c \
166 vnet/ppp/ppp.c
167
168nobase_include_HEADERS += \
169 vnet/ppp/error.def \
170 vnet/ppp/ppp.h \
171 vnet/ppp/packet.h
172
173########################################
174# Layer 2 protocol: HDLC
175########################################
176libvnet_la_SOURCES += \
177 vnet/hdlc/node.c \
178 vnet/hdlc/pg.c \
179 vnet/hdlc/hdlc.c
180
181nobase_include_HEADERS += \
182 vnet/hdlc/error.def \
183 vnet/hdlc/hdlc.h \
184 vnet/hdlc/packet.h
185
186########################################
187# Layer 2 protocol: LLC
188########################################
189libvnet_la_SOURCES += \
190 vnet/llc/llc.c \
191 vnet/llc/node.c \
192 vnet/llc/pg.c
193
194nobase_include_HEADERS += \
195 vnet/llc/llc.h
196
197########################################
198# Layer 2 protocol: SNAP
199########################################
200libvnet_la_SOURCES += \
201 vnet/snap/snap.c \
202 vnet/snap/node.c \
203 vnet/snap/pg.c
204
205nobase_include_HEADERS += \
206 vnet/snap/snap.h
207
208########################################
209# Layer 2 / vxlan
210########################################
211libvnet_la_SOURCES += \
212 vnet/vxlan/vxlan.c \
213 vnet/vxlan/encap.c \
214 vnet/vxlan/decap.c
215
216nobase_include_HEADERS += \
217 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500218 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700219 vnet/vxlan/vxlan_error.def
220
221########################################
Dave Barachced48e72016-02-08 15:57:35 -0500222# Layer 2 / CDP
223########################################
224libvnet_la_SOURCES += \
225 vnet/cdp/cdp_input.c \
226 vnet/cdp/cdp_node.c \
227 vnet/cdp/cdp_periodic.c
228
229nobase_include_HEADERS += \
230 vnet/cdp/cdp_protocol.h
231
232########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200233# Layer 2 / LLDP
234########################################
235libvnet_la_SOURCES += \
236 vnet/lldp/lldp_input.c \
237 vnet/lldp/lldp_node.c \
238 vnet/lldp/lldp_output.c \
239 vnet/lldp/lldp_cli.c
240
241nobase_include_HEADERS += \
242 vnet/lldp/lldp_protocol.h
243
244########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700245# Layer 2/3 "classify"
246########################################
247libvnet_la_SOURCES += \
248 vnet/classify/vnet_classify.c \
249 vnet/classify/ip_classify.c \
250 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700251 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700252 vnet/classify/flow_classify.c \
253 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700254 vnet/classify/vnet_classify.h
255
256nobase_include_HEADERS += \
257 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700258 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700259 vnet/classify/policer_classify.h \
260 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700261
262########################################
263# Layer 3 protocols go here
264########################################
265
Ed Warnickecb9cada2015-12-08 15:45:58 -0700266########################################
267# Layer 3 protocol: IP v4/v6
268########################################
269libvnet_la_SOURCES += \
270 vnet/ip/format.c \
271 vnet/ip/icmp4.c \
272 vnet/ip/icmp6.c \
273 vnet/ip/ip46_cli.c \
274 vnet/ip/ip4_format.c \
275 vnet/ip/ip4_forward.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700276 vnet/ip/ip4_input.c \
277 vnet/ip/ip4_mtrie.c \
278 vnet/ip/ip4_pg.c \
Dave Barach6f9bca22016-04-30 10:25:32 -0400279 vnet/ip/ip4_source_and_port_range_check.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200280 vnet/ip/ip4_source_check.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700281 vnet/ip/ip6_format.c \
282 vnet/ip/ip6_forward.c \
283 vnet/ip/ip6_hop_by_hop.c \
284 vnet/ip/ip6_input.c \
285 vnet/ip/ip6_neighbor.c \
286 vnet/ip/ip6_pg.c \
287 vnet/ip/ip_checksum.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200288 vnet/ip/ip_frag.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700289 vnet/ip/ip.h \
290 vnet/ip/ip_init.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200291 vnet/ip/ip_input_acl.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700292 vnet/ip/lookup.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200293 vnet/ip/ping.c \
294 vnet/ip/punt.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700295 vnet/ip/udp_format.c \
296 vnet/ip/udp_init.c \
297 vnet/ip/udp_local.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200298 vnet/ip/udp_pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700299
300nobase_include_HEADERS += \
301 vnet/ip/format.h \
302 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100303 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700304 vnet/ip/icmp6.h \
305 vnet/ip/igmp_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200306 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700307 vnet/ip/ip4.h \
308 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700309 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700310 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200311 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700312 vnet/ip/ip6_hop_by_hop.h \
313 vnet/ip/ip6_hop_by_hop_packet.h \
314 vnet/ip/ip6_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200315 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700316 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200317 vnet/ip/ip_source_and_port_range_check.h \
318 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700319 vnet/ip/ports.def \
320 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700321 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200322 vnet/ip/punt.h \
323 vnet/ip/tcp_packet.h \
324 vnet/ip/udp_error.def \
325 vnet/ip/udp.h \
326 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700327
328########################################
329# Layer 3 protocol: IPSec
330########################################
Dave Barach61efa142016-01-22 08:23:09 -0500331if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700332libvnet_la_SOURCES += \
333 vnet/ipsec/ipsec.c \
334 vnet/ipsec/ipsec_cli.c \
335 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700336 vnet/ipsec/ipsec_input.c \
337 vnet/ipsec/ipsec_if.c \
338 vnet/ipsec/ipsec_if_in.c \
339 vnet/ipsec/ipsec_if_out.c \
340 vnet/ipsec/esp_encrypt.c \
341 vnet/ipsec/esp_decrypt.c \
342 vnet/ipsec/ikev2.c \
343 vnet/ipsec/ikev2_crypto.c \
344 vnet/ipsec/ikev2_cli.c \
345 vnet/ipsec/ikev2_payload.c \
346 vnet/ipsec/ikev2_format.c
Dave Barach61efa142016-01-22 08:23:09 -0500347endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700348
Damjan Marione936bbe2016-02-25 23:17:38 +0100349libvnet_la_SOURCES += \
350 vnet/ipsec/ipsec_output.c
351
Ed Warnickecb9cada2015-12-08 15:45:58 -0700352nobase_include_HEADERS += \
353 vnet/ipsec/ipsec.h \
354 vnet/ipsec/esp.h \
355 vnet/ipsec/ikev2.h \
356 vnet/ipsec/ikev2_priv.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700357
358########################################
359# Layer 3 protocol: osi
360########################################
361libvnet_la_SOURCES += \
362 vnet/osi/node.c \
363 vnet/osi/osi.c \
364 vnet/osi/pg.c
365
366nobase_include_HEADERS += \
367 vnet/osi/osi.h
368
369########################################
370# Layer 3 protocol: MAP
371########################################
372libvnet_la_SOURCES += \
373 vnet/map/map.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100374 vnet/map/map_dpo.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700375 vnet/map/ip4_map.c \
376 vnet/map/ip6_map.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700377 vnet/map/ip4_map_t.c \
378 vnet/map/ip6_map_t.c
379
380nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100381 vnet/map/map.h \
382 vnet/map/map_dpo.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700383
Ole Troand575e692016-08-25 12:26:47 +0200384if ENABLE_TESTS
385TESTS += test_map
386test_map_SOURCES = \
387 vnet/map/test.c
388test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
389
390test_map_LDADD = libvnet.la -lvppinfra -lvlib \
391 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
392 -ldl -lsvm -lrt
393
394test_map_LDFLAGS = -static
395endif
396
397
Ed Warnickecb9cada2015-12-08 15:45:58 -0700398########################################
399# Tunnel protocol: gre
400########################################
401libvnet_la_SOURCES += \
402 vnet/gre/gre.c \
403 vnet/gre/node.c \
404 vnet/gre/interface.c \
405 vnet/gre/pg.c
406
407nobase_include_HEADERS += \
408 vnet/gre/gre.h \
409 vnet/gre/packet.h \
410 vnet/gre/error.def
411
412########################################
413# Tunnel protocol: l2tpv3
414########################################
415libvnet_la_SOURCES += \
416 vnet/l2tp/l2tp.c \
417 vnet/l2tp/encap.c \
418 vnet/l2tp/decap.c \
419 vnet/l2tp/pg.c
420
421nobase_include_HEADERS += \
422 vnet/l2tp/l2tp.h \
423 vnet/l2tp/packet.h
424
425########################################
426# Tunnel protocol: gre+mpls
427########################################
428libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100429 vnet/mpls/mpls.c \
430 vnet/mpls/mpls_lookup.c \
431 vnet/mpls/mpls_output.c \
432 vnet/mpls/mpls_features.c \
433 vnet/mpls/node.c \
434 vnet/mpls/interface.c \
435 vnet/mpls/policy_encap.c \
436 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700437
438nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100439 vnet/mpls/mpls.h \
440 vnet/mpls/mpls_types.h \
441 vnet/mpls/packet.h \
442 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700443
444
445########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700446# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700447########################################
448
449libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700450 vnet/vxlan-gpe/vxlan_gpe.c \
451 vnet/vxlan-gpe/encap.c \
452 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700453
454nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700455 vnet/vxlan-gpe/vxlan_gpe.h \
456 vnet/vxlan-gpe/vxlan_gpe_packet.h \
457 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700458
459########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700460# Tunnel protocol: ipsec+gre
461########################################
462libvnet_la_SOURCES += \
463 vnet/ipsec-gre/ipsec_gre.c \
464 vnet/ipsec-gre/node.c \
465 vnet/ipsec-gre/interface.c
466
467nobase_include_HEADERS += \
468 vnet/ipsec-gre/ipsec_gre.h \
469 vnet/ipsec-gre/error.def
470
471########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100472# LISP control plane: lisp-cp
473########################################
474
475libvnet_la_SOURCES += \
476 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100477 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100478 vnet/lisp-cp/control.c \
479 vnet/lisp-cp/gid_dictionary.c \
480 vnet/lisp-cp/lisp_msg_serdes.c \
481 vnet/lisp-cp/packets.c
482
483nobase_include_HEADERS += \
484 vnet/lisp-cp/lisp_types.h \
485 vnet/lisp-cp/packets.h \
486 vnet/lisp-cp/gid_dictionary.h \
487 vnet/lisp-cp/lisp_cp_messages.h \
488 vnet/lisp-cp/lisp_msg_serdes.h \
489 vnet/lisp-cp/control.h
490
Filip Tehlar254b0362016-04-07 10:04:34 +0200491
492if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200493LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200494 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
495
496TESTS += test_cp_serdes test_lisp_types
497
498test_cp_serdes_SOURCES = \
499 test/lisp-cp/test_cp_serdes.c \
500 vnet/lisp-cp/lisp_msg_serdes.c \
501 vnet/lisp-cp/lisp_types.c \
502 vnet/lisp-cp/packets.c \
503 vnet/ip/ip_checksum.c
504
505test_lisp_types_SOURCES = \
506 test/lisp-cp/test_lisp_types.c \
507 vnet/lisp-cp/lisp_types.c
508
509test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
510test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
511
512test_cp_serdes_LDADD = libvnet.la $(LDS)
513test_lisp_types_LDADD = libvnet.la $(LDS)
514
515test_cp_serdes_LDFLAGS = -static
516test_lisp_types_LDFLAGS = -static
517endif
518
Florin Corase127a7e2016-02-18 22:20:01 +0100519########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700520# Tunnel protocol: lisp-gpe
521########################################
522
523libvnet_la_SOURCES += \
524 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100525 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
526 vnet/lisp-gpe/lisp_gpe_adjacency.c \
527 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100528 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
529 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200530 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100531 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700532
533nobase_include_HEADERS += \
534 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100535 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
536 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700537 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100538 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700539
Filip Tehlar254b0362016-04-07 10:04:34 +0200540if ENABLE_TESTS
541TESTS += test_test
542
543test_test_SOURCES = test/lisp-gpe/test.c
544
545test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
546
547test_test_LDADD = $(LIBOBJS)
548
549noinst_PROGRAMS += $(TESTS)
550check_PROGRAMS = $(TESTS)
551endif
552
Ed Warnickecb9cada2015-12-08 15:45:58 -0700553########################################
554# DHCP client
555########################################
556libvnet_la_SOURCES += \
557 vnet/dhcp/client.c \
558 vnet/dhcp/client.h
559
560nobase_include_HEADERS += \
561 vnet/dhcp/client.h
562
563########################################
564# DHCP proxy
565########################################
566libvnet_la_SOURCES += \
567 vnet/dhcp/proxy_node.c \
568 vnet/dhcp/proxy.h
569
570nobase_include_HEADERS += \
571 vnet/dhcp/packet.h \
572 vnet/dhcp/proxy.h \
573 vnet/dhcp/proxy_error.def
574
575########################################
576# ipv6 segment routing
577########################################
Dave Barach61efa142016-01-22 08:23:09 -0500578
579if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700580libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700581 vnet/sr/sr.c \
582 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500583endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700584
585nobase_include_HEADERS += \
586 vnet/sr/sr_packet.h \
587 vnet/sr/sr_error.def \
588 vnet/sr/sr.h
589
590########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700591# DHCPv6 proxy
592########################################
593libvnet_la_SOURCES += \
594 vnet/dhcpv6/proxy_node.c
595
596nobase_include_HEADERS += \
597 vnet/dhcpv6/packet.h \
598 vnet/dhcpv6/proxy.h \
599 vnet/dhcpv6/proxy_error.def
600
601########################################
602# IPFIX / netflow v10
603########################################
604libvnet_la_SOURCES += \
605 vnet/flow/flow_report.c
606
607nobase_include_HEADERS += \
608 vnet/flow/flow_report.h \
609 vnet/flow/ipfix_info_elements.h \
610 vnet/flow/ipfix_packet.h
611
612########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700613# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700614########################################
615
616libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700617 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700618
619nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700620 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700621
622########################################
623# lawful intercept
624########################################
625
626libvnet_la_SOURCES += \
627 vnet/lawful-intercept/lawful_intercept.c \
628 vnet/lawful-intercept/node.c
629
630nobase_include_HEADERS += \
631 vnet/dpdk_replication.h \
632 vnet/lawful-intercept/lawful_intercept.h
633
634########################################
635# Packet generator
636########################################
637
638libvnet_la_SOURCES += \
639 vnet/pg/cli.c \
640 vnet/pg/edit.c \
641 vnet/pg/init.c \
642 vnet/pg/input.c \
643 vnet/pg/output.c \
644 vnet/pg/stream.c
645
646nobase_include_HEADERS += \
647 vnet/pg/pg.h \
648 vnet/pg/edit.h
649
650########################################
651# Intel DPDK
652########################################
653if WITH_DPDK
654libvnet_la_SOURCES += \
655 vnet/devices/dpdk/dpdk_priv.h \
656 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100657 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700658 vnet/devices/dpdk/init.c \
659 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100660 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700661 vnet/devices/dpdk/cli.c
662
663nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200664 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200665else
666libvnet_la_SOURCES += \
667 vnet/devices/nic/ixge.c \
668 vnet/devices/nic/ixge.h \
669 vnet/devices/nic/sfp.c \
670 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700671endif
672
673########################################
674# virtio
675########################################
676
Ed Warnickecb9cada2015-12-08 15:45:58 -0700677libvnet_la_SOURCES += \
678 vnet/devices/virtio/vhost-user.c
679
680nobase_include_HEADERS += \
681 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700682
683########################################
684# ssvm ethernet
685########################################
686libvnet_la_SOURCES += \
687 vnet/devices/ssvm/ssvm_eth.c \
688 vnet/devices/ssvm/node.c
689
690nobase_include_HEADERS += \
691 vnet/devices/ssvm/ssvm_eth.h
692
693########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100694# Linux packet interface
695########################################
696
697libvnet_la_SOURCES += \
698 vnet/devices/af_packet/af_packet.c \
699 vnet/devices/af_packet/device.c \
700 vnet/devices/af_packet/node.c \
701 vnet/devices/af_packet/cli.c
702
703nobase_include_HEADERS += \
704 vnet/devices/af_packet/af_packet.h
705
706########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200707# NETMAP interface
708########################################
709
710libvnet_la_SOURCES += \
711 vnet/devices/netmap/netmap.c \
712 vnet/devices/netmap/device.c \
713 vnet/devices/netmap/node.c \
714 vnet/devices/netmap/cli.c
715
716nobase_include_HEADERS += \
717 vnet/devices/netmap/netmap.h
718
719
720########################################
Damjan Marion22311502016-10-28 20:30:15 +0200721# Driver feature graph arc support
722########################################
723
724libvnet_la_SOURCES += \
725 vnet/devices/feature.c \
726 vnet/feature/feature.c \
727 vnet/feature/registration.c
728
729nobase_include_HEADERS += \
730 vnet/feature/feature.h
731
732########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700733# Unix kernel related
734########################################
735
736# FIXME: vnet/unix/hgshm.c
737
738libvnet_la_SOURCES += \
739 vnet/unix/gdb_funcs.c \
740 vnet/unix/pcap.c \
741 vnet/unix/tapcli.c \
742 vnet/unix/tuntap.c
743
744nobase_include_HEADERS += \
745 vnet/unix/pcap.h \
746 vnet/unix/tuntap.h \
747 vnet/unix/tapcli.h
748
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400749########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100750# FIB
751########################################
752
753libvnet_la_SOURCES += \
754 vnet/fib/fib.c \
755 vnet/fib/fib_test.c \
756 vnet/fib/ip4_fib.c \
757 vnet/fib/ip6_fib.c \
758 vnet/fib/mpls_fib.c \
759 vnet/fib/fib_table.c \
760 vnet/fib/fib_walk.c \
761 vnet/fib/fib_types.c \
762 vnet/fib/fib_node.c \
763 vnet/fib/fib_node_list.c \
764 vnet/fib/fib_entry.c \
765 vnet/fib/fib_entry_src.c \
766 vnet/fib/fib_entry_src_rr.c \
767 vnet/fib/fib_entry_src_interface.c \
768 vnet/fib/fib_entry_src_default_route.c \
769 vnet/fib/fib_entry_src_special.c \
770 vnet/fib/fib_entry_src_api.c \
771 vnet/fib/fib_entry_src_adj.c \
772 vnet/fib/fib_entry_src_mpls.c \
773 vnet/fib/fib_entry_src_lisp.c \
774 vnet/fib/fib_entry_cover.c \
775 vnet/fib/fib_path_list.c \
776 vnet/fib/fib_path.c \
777 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100778 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100779 vnet/fib/fib_attached_export.c
780
781nobase_include_HEADERS += \
782 vnet/fib/fib.h \
783 vnet/fib/ip4_fib.h \
784 vnet/fib/ip6_fib.h \
785 vnet/fib/fib_types.h \
786 vnet/fib/fib_table.h \
787 vnet/fib/fib_node.h \
788 vnet/fib/fib_node_list.h \
789 vnet/fib/fib_entry.h
790
791########################################
792# ADJ
793########################################
794
795libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100796 vnet/adj/adj_nbr.c \
797 vnet/adj/adj_rewrite.c \
798 vnet/adj/adj_glean.c \
799 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100800 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100801 vnet/adj/adj.c
802
803nobase_include_HEADERS += \
804 vnet/adj/adj.h \
805 vnet/adj/adj_types.h \
806 vnet/adj/adj_rewrite.h \
807 vnet/adj/adj_glean.h \
808 vnet/adj/adj_nbr.h
809
810########################################
811# Data-Plane Objects
812########################################
813
814libvnet_la_SOURCES += \
815 vnet/dpo/dpo.c \
816 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100817 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100818 vnet/dpo/punt_dpo.c \
819 vnet/dpo/receive_dpo.c \
820 vnet/dpo/load_balance.c \
821 vnet/dpo/load_balance_map.c \
822 vnet/dpo/lookup_dpo.c \
823 vnet/dpo/classify_dpo.c \
824 vnet/dpo/mpls_label_dpo.c
825
826nobase_include_HEADERS += \
827 vnet/dpo/load_balance.h \
828 vnet/dpo/drop_dpo.h \
829 vnet/dpo/lookup_dpo.h \
830 vnet/dpo/punt_dpo.h \
831 vnet/dpo/classify_dpo.h \
832 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100833 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100834 vnet/dpo/dpo.h
835
836########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400837# Plugin client library
838########################################
839
840libvnetplugin_la_SOURCES += \
841 vnet/plugin/p1.c
842
843nobase_include_HEADERS += \
844 vnet/plugin/plugin.h
845
846lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700847
Ed Warnickecb9cada2015-12-08 15:45:58 -0700848pcap2pg_SOURCES = \
849 vnet/unix/pcap2pg.c \
850 vnet/unix/pcap.h
851
852pcap2pg_LDFLAGS = -static
853pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
854
855noinst_PROGRAMS += pcap2pg