blob: f35ec1372dbd90908f4f50f3902ffee03f38bbf7 [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 \
47 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020048 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070049 vnet/interface.h \
50 vnet/interface_funcs.h \
51 vnet/l3_types.h \
52 vnet/pipeline.h \
53 vnet/replication.h \
54 vnet/rewrite.h \
55 vnet/vnet.h
56
57########################################
58# Policer infra
59########################################
60
61libvnet_la_SOURCES += \
62 vnet/policer/node_funcs.c \
63 vnet/policer/policer.c \
64 vnet/policer/xlate.c
65
66nobase_include_HEADERS += \
67 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070068 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070069 vnet/policer/xlate.h
70
Dave Barachc07bf5d2016-02-17 17:52:26 -050071########################################
72# Cop - junk filter
73########################################
74
75libvnet_la_SOURCES += \
76 vnet/cop/cop.c \
77 vnet/cop/node1.c \
78 vnet/cop/ip4_whitelist.c \
79 vnet/cop/ip6_whitelist.c
80
81nobase_include_HEADERS += \
82 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070083
84########################################
85# Layer 2 protocols go here
86########################################
87
88########################################
89# Layer 2 protocol: Ethernet
90########################################
91libvnet_la_SOURCES += \
92 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070093 vnet/ethernet/format.c \
94 vnet/ethernet/init.c \
95 vnet/ethernet/interface.c \
96 vnet/ethernet/node.c \
97 vnet/ethernet/pg.c
98
99nobase_include_HEADERS += \
100 vnet/ethernet/arp_packet.h \
101 vnet/ethernet/error.def \
102 vnet/ethernet/ethernet.h \
103 vnet/ethernet/packet.h \
104 vnet/ethernet/types.def
105
106########################################
107# Layer 2 protocol: Ethernet bridging
108########################################
109libvnet_la_SOURCES += \
110 vnet/l2/feat_bitmap.c \
111 vnet/l2/l2_bd.c \
112 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400113 vnet/l2/l2_input_classify.c \
114 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700115 vnet/l2/l2_efp_filter.c \
116 vnet/l2/l2_fib.c \
117 vnet/l2/l2_flood.c \
118 vnet/l2/l2_fwd.c \
119 vnet/l2/l2_input_acl.c \
120 vnet/l2/l2_input.c \
121 vnet/l2/l2_input_vtr.c \
122 vnet/l2/l2_learn.c \
123 vnet/l2/l2_output_acl.c \
124 vnet/l2/l2_output.c \
125 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000126 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700127 vnet/l2/l2_vtr.c \
128 vnet/l2/l2_xcrw.c
129
130nobase_include_HEADERS += \
131 vnet/l2/feat_bitmap.h \
132 vnet/l2/l2_input.h \
133 vnet/l2/l2_output.h \
134 vnet/l2/l2_vtr.h \
135 vnet/l2/l2_input_vtr.h \
136 vnet/l2/l2_efp_filter.h \
137 vnet/l2/l2_fwd.h \
138 vnet/l2/l2_bd.h \
139 vnet/l2/l2_bvi.h \
140 vnet/l2/l2_flood.h \
141 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000142 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700143 vnet/l2/l2_xcrw.h \
144 vnet/l2/l2_classify.h
145
146########################################
147# Layer 2 protocol: SRP
148########################################
149libvnet_la_SOURCES += \
150 vnet/srp/format.c \
151 vnet/srp/interface.c \
152 vnet/srp/node.c \
153 vnet/srp/pg.c
154
155nobase_include_HEADERS += \
156 vnet/srp/packet.h \
157 vnet/srp/srp.h
158
159########################################
160# Layer 2 protocol: PPP
161########################################
162libvnet_la_SOURCES += \
163 vnet/ppp/node.c \
164 vnet/ppp/pg.c \
165 vnet/ppp/ppp.c
166
167nobase_include_HEADERS += \
168 vnet/ppp/error.def \
169 vnet/ppp/ppp.h \
170 vnet/ppp/packet.h
171
172########################################
173# Layer 2 protocol: HDLC
174########################################
175libvnet_la_SOURCES += \
176 vnet/hdlc/node.c \
177 vnet/hdlc/pg.c \
178 vnet/hdlc/hdlc.c
179
180nobase_include_HEADERS += \
181 vnet/hdlc/error.def \
182 vnet/hdlc/hdlc.h \
183 vnet/hdlc/packet.h
184
185########################################
186# Layer 2 protocol: LLC
187########################################
188libvnet_la_SOURCES += \
189 vnet/llc/llc.c \
190 vnet/llc/node.c \
191 vnet/llc/pg.c
192
193nobase_include_HEADERS += \
194 vnet/llc/llc.h
195
196########################################
197# Layer 2 protocol: SNAP
198########################################
199libvnet_la_SOURCES += \
200 vnet/snap/snap.c \
201 vnet/snap/node.c \
202 vnet/snap/pg.c
203
204nobase_include_HEADERS += \
205 vnet/snap/snap.h
206
207########################################
208# Layer 2 / vxlan
209########################################
210libvnet_la_SOURCES += \
211 vnet/vxlan/vxlan.c \
212 vnet/vxlan/encap.c \
213 vnet/vxlan/decap.c
214
215nobase_include_HEADERS += \
216 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500217 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700218 vnet/vxlan/vxlan_error.def
219
220########################################
Dave Barachced48e72016-02-08 15:57:35 -0500221# Layer 2 / CDP
222########################################
223libvnet_la_SOURCES += \
224 vnet/cdp/cdp_input.c \
225 vnet/cdp/cdp_node.c \
226 vnet/cdp/cdp_periodic.c
227
228nobase_include_HEADERS += \
229 vnet/cdp/cdp_protocol.h
230
231########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200232# Layer 2 / LLDP
233########################################
234libvnet_la_SOURCES += \
235 vnet/lldp/lldp_input.c \
236 vnet/lldp/lldp_node.c \
237 vnet/lldp/lldp_output.c \
238 vnet/lldp/lldp_cli.c
239
240nobase_include_HEADERS += \
241 vnet/lldp/lldp_protocol.h
242
243########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700244# Layer 2/3 "classify"
245########################################
246libvnet_la_SOURCES += \
247 vnet/classify/vnet_classify.c \
248 vnet/classify/ip_classify.c \
249 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700250 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700251 vnet/classify/flow_classify.c \
252 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700253 vnet/classify/vnet_classify.h
254
255nobase_include_HEADERS += \
256 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700257 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700258 vnet/classify/policer_classify.h \
259 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700260
261########################################
262# Layer 3 protocols go here
263########################################
264
Ed Warnickecb9cada2015-12-08 15:45:58 -0700265########################################
266# Layer 3 protocol: IP v4/v6
267########################################
268libvnet_la_SOURCES += \
Damjan Marion770930c2016-10-13 14:10:10 +0200269 vnet/ip/feature_registration.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700270 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 += \
Damjan Marion770930c2016-10-13 14:10:10 +0200301 vnet/ip/feature_registration.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700302 vnet/ip/format.h \
303 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100304 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700305 vnet/ip/icmp6.h \
306 vnet/ip/igmp_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200307 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700308 vnet/ip/ip4.h \
309 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700310 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700311 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200312 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700313 vnet/ip/ip6_hop_by_hop.h \
314 vnet/ip/ip6_hop_by_hop_packet.h \
315 vnet/ip/ip6_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200316 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700317 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200318 vnet/ip/ip_source_and_port_range_check.h \
319 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700320 vnet/ip/ports.def \
321 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700322 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200323 vnet/ip/punt.h \
324 vnet/ip/tcp_packet.h \
325 vnet/ip/udp_error.def \
326 vnet/ip/udp.h \
327 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700328
329########################################
330# Layer 3 protocol: IPSec
331########################################
Dave Barach61efa142016-01-22 08:23:09 -0500332if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700333libvnet_la_SOURCES += \
334 vnet/ipsec/ipsec.c \
335 vnet/ipsec/ipsec_cli.c \
336 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700337 vnet/ipsec/ipsec_input.c \
338 vnet/ipsec/ipsec_if.c \
339 vnet/ipsec/ipsec_if_in.c \
340 vnet/ipsec/ipsec_if_out.c \
341 vnet/ipsec/esp_encrypt.c \
342 vnet/ipsec/esp_decrypt.c \
343 vnet/ipsec/ikev2.c \
344 vnet/ipsec/ikev2_crypto.c \
345 vnet/ipsec/ikev2_cli.c \
346 vnet/ipsec/ikev2_payload.c \
347 vnet/ipsec/ikev2_format.c
Dave Barach61efa142016-01-22 08:23:09 -0500348endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700349
Damjan Marione936bbe2016-02-25 23:17:38 +0100350libvnet_la_SOURCES += \
351 vnet/ipsec/ipsec_output.c
352
Ed Warnickecb9cada2015-12-08 15:45:58 -0700353nobase_include_HEADERS += \
354 vnet/ipsec/ipsec.h \
355 vnet/ipsec/esp.h \
356 vnet/ipsec/ikev2.h \
357 vnet/ipsec/ikev2_priv.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700358
359########################################
360# Layer 3 protocol: osi
361########################################
362libvnet_la_SOURCES += \
363 vnet/osi/node.c \
364 vnet/osi/osi.c \
365 vnet/osi/pg.c
366
367nobase_include_HEADERS += \
368 vnet/osi/osi.h
369
370########################################
371# Layer 3 protocol: MAP
372########################################
373libvnet_la_SOURCES += \
374 vnet/map/map.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100375 vnet/map/map_dpo.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700376 vnet/map/ip4_map.c \
377 vnet/map/ip6_map.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700378 vnet/map/ip4_map_t.c \
379 vnet/map/ip6_map_t.c
380
381nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100382 vnet/map/map.h \
383 vnet/map/map_dpo.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700384
Ole Troand575e692016-08-25 12:26:47 +0200385if ENABLE_TESTS
386TESTS += test_map
387test_map_SOURCES = \
388 vnet/map/test.c
389test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
390
391test_map_LDADD = libvnet.la -lvppinfra -lvlib \
392 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
393 -ldl -lsvm -lrt
394
395test_map_LDFLAGS = -static
396endif
397
398
Ed Warnickecb9cada2015-12-08 15:45:58 -0700399########################################
400# Tunnel protocol: gre
401########################################
402libvnet_la_SOURCES += \
403 vnet/gre/gre.c \
404 vnet/gre/node.c \
405 vnet/gre/interface.c \
406 vnet/gre/pg.c
407
408nobase_include_HEADERS += \
409 vnet/gre/gre.h \
410 vnet/gre/packet.h \
411 vnet/gre/error.def
412
413########################################
414# Tunnel protocol: l2tpv3
415########################################
416libvnet_la_SOURCES += \
417 vnet/l2tp/l2tp.c \
418 vnet/l2tp/encap.c \
419 vnet/l2tp/decap.c \
420 vnet/l2tp/pg.c
421
422nobase_include_HEADERS += \
423 vnet/l2tp/l2tp.h \
424 vnet/l2tp/packet.h
425
426########################################
427# Tunnel protocol: gre+mpls
428########################################
429libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100430 vnet/mpls/mpls.c \
431 vnet/mpls/mpls_lookup.c \
432 vnet/mpls/mpls_output.c \
433 vnet/mpls/mpls_features.c \
434 vnet/mpls/node.c \
435 vnet/mpls/interface.c \
436 vnet/mpls/policy_encap.c \
437 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700438
439nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100440 vnet/mpls/mpls.h \
441 vnet/mpls/mpls_types.h \
442 vnet/mpls/packet.h \
443 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700444
445
446########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700447# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700448########################################
449
450libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700451 vnet/vxlan-gpe/vxlan_gpe.c \
452 vnet/vxlan-gpe/encap.c \
453 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700454
455nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700456 vnet/vxlan-gpe/vxlan_gpe.h \
457 vnet/vxlan-gpe/vxlan_gpe_packet.h \
458 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700459
460########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700461# Tunnel protocol: ipsec+gre
462########################################
463libvnet_la_SOURCES += \
464 vnet/ipsec-gre/ipsec_gre.c \
465 vnet/ipsec-gre/node.c \
466 vnet/ipsec-gre/interface.c
467
468nobase_include_HEADERS += \
469 vnet/ipsec-gre/ipsec_gre.h \
470 vnet/ipsec-gre/error.def
471
472########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100473# LISP control plane: lisp-cp
474########################################
475
476libvnet_la_SOURCES += \
477 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100478 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100479 vnet/lisp-cp/control.c \
480 vnet/lisp-cp/gid_dictionary.c \
481 vnet/lisp-cp/lisp_msg_serdes.c \
482 vnet/lisp-cp/packets.c
483
484nobase_include_HEADERS += \
485 vnet/lisp-cp/lisp_types.h \
486 vnet/lisp-cp/packets.h \
487 vnet/lisp-cp/gid_dictionary.h \
488 vnet/lisp-cp/lisp_cp_messages.h \
489 vnet/lisp-cp/lisp_msg_serdes.h \
490 vnet/lisp-cp/control.h
491
Filip Tehlar254b0362016-04-07 10:04:34 +0200492
493if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200494LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200495 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
496
497TESTS += test_cp_serdes test_lisp_types
498
499test_cp_serdes_SOURCES = \
500 test/lisp-cp/test_cp_serdes.c \
501 vnet/lisp-cp/lisp_msg_serdes.c \
502 vnet/lisp-cp/lisp_types.c \
503 vnet/lisp-cp/packets.c \
504 vnet/ip/ip_checksum.c
505
506test_lisp_types_SOURCES = \
507 test/lisp-cp/test_lisp_types.c \
508 vnet/lisp-cp/lisp_types.c
509
510test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
511test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
512
513test_cp_serdes_LDADD = libvnet.la $(LDS)
514test_lisp_types_LDADD = libvnet.la $(LDS)
515
516test_cp_serdes_LDFLAGS = -static
517test_lisp_types_LDFLAGS = -static
518endif
519
Florin Corase127a7e2016-02-18 22:20:01 +0100520########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700521# Tunnel protocol: lisp-gpe
522########################################
523
524libvnet_la_SOURCES += \
525 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100526 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
527 vnet/lisp-gpe/lisp_gpe_adjacency.c \
528 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100529 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
530 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200531 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100532 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700533
534nobase_include_HEADERS += \
535 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100536 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
537 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700538 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100539 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700540
Filip Tehlar254b0362016-04-07 10:04:34 +0200541if ENABLE_TESTS
542TESTS += test_test
543
544test_test_SOURCES = test/lisp-gpe/test.c
545
546test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
547
548test_test_LDADD = $(LIBOBJS)
549
550noinst_PROGRAMS += $(TESTS)
551check_PROGRAMS = $(TESTS)
552endif
553
Ed Warnickecb9cada2015-12-08 15:45:58 -0700554########################################
555# DHCP client
556########################################
557libvnet_la_SOURCES += \
558 vnet/dhcp/client.c \
559 vnet/dhcp/client.h
560
561nobase_include_HEADERS += \
562 vnet/dhcp/client.h
563
564########################################
565# DHCP proxy
566########################################
567libvnet_la_SOURCES += \
568 vnet/dhcp/proxy_node.c \
569 vnet/dhcp/proxy.h
570
571nobase_include_HEADERS += \
572 vnet/dhcp/packet.h \
573 vnet/dhcp/proxy.h \
574 vnet/dhcp/proxy_error.def
575
576########################################
577# ipv6 segment routing
578########################################
Dave Barach61efa142016-01-22 08:23:09 -0500579
580if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700581libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700582 vnet/sr/sr.c \
583 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500584endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700585
586nobase_include_HEADERS += \
587 vnet/sr/sr_packet.h \
588 vnet/sr/sr_error.def \
589 vnet/sr/sr.h
590
591########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700592# DHCPv6 proxy
593########################################
594libvnet_la_SOURCES += \
595 vnet/dhcpv6/proxy_node.c
596
597nobase_include_HEADERS += \
598 vnet/dhcpv6/packet.h \
599 vnet/dhcpv6/proxy.h \
600 vnet/dhcpv6/proxy_error.def
601
602########################################
603# IPFIX / netflow v10
604########################################
605libvnet_la_SOURCES += \
606 vnet/flow/flow_report.c
607
608nobase_include_HEADERS += \
609 vnet/flow/flow_report.h \
610 vnet/flow/ipfix_info_elements.h \
611 vnet/flow/ipfix_packet.h
612
613########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700614# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700615########################################
616
617libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700618 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700619
620nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700621 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700622
623########################################
624# lawful intercept
625########################################
626
627libvnet_la_SOURCES += \
628 vnet/lawful-intercept/lawful_intercept.c \
629 vnet/lawful-intercept/node.c
630
631nobase_include_HEADERS += \
632 vnet/dpdk_replication.h \
633 vnet/lawful-intercept/lawful_intercept.h
634
635########################################
636# Packet generator
637########################################
638
639libvnet_la_SOURCES += \
640 vnet/pg/cli.c \
641 vnet/pg/edit.c \
642 vnet/pg/init.c \
643 vnet/pg/input.c \
644 vnet/pg/output.c \
645 vnet/pg/stream.c
646
647nobase_include_HEADERS += \
648 vnet/pg/pg.h \
649 vnet/pg/edit.h
650
651########################################
652# Intel DPDK
653########################################
654if WITH_DPDK
655libvnet_la_SOURCES += \
656 vnet/devices/dpdk/dpdk_priv.h \
657 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100658 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700659 vnet/devices/dpdk/init.c \
660 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100661 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700662 vnet/devices/dpdk/cli.c
663
664nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200665 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200666else
667libvnet_la_SOURCES += \
668 vnet/devices/nic/ixge.c \
669 vnet/devices/nic/ixge.h \
670 vnet/devices/nic/sfp.c \
671 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700672endif
673
674########################################
675# virtio
676########################################
677
Ed Warnickecb9cada2015-12-08 15:45:58 -0700678libvnet_la_SOURCES += \
679 vnet/devices/virtio/vhost-user.c
680
681nobase_include_HEADERS += \
682 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700683
684########################################
685# ssvm ethernet
686########################################
687libvnet_la_SOURCES += \
688 vnet/devices/ssvm/ssvm_eth.c \
689 vnet/devices/ssvm/node.c
690
691nobase_include_HEADERS += \
692 vnet/devices/ssvm/ssvm_eth.h
693
694########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100695# Linux packet interface
696########################################
697
698libvnet_la_SOURCES += \
699 vnet/devices/af_packet/af_packet.c \
700 vnet/devices/af_packet/device.c \
701 vnet/devices/af_packet/node.c \
702 vnet/devices/af_packet/cli.c
703
704nobase_include_HEADERS += \
705 vnet/devices/af_packet/af_packet.h
706
707########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200708# NETMAP interface
709########################################
710
711libvnet_la_SOURCES += \
712 vnet/devices/netmap/netmap.c \
713 vnet/devices/netmap/device.c \
714 vnet/devices/netmap/node.c \
715 vnet/devices/netmap/cli.c
716
717nobase_include_HEADERS += \
718 vnet/devices/netmap/netmap.h
719
720
721########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700722# Unix kernel related
723########################################
724
725# FIXME: vnet/unix/hgshm.c
726
727libvnet_la_SOURCES += \
728 vnet/unix/gdb_funcs.c \
729 vnet/unix/pcap.c \
730 vnet/unix/tapcli.c \
731 vnet/unix/tuntap.c
732
733nobase_include_HEADERS += \
734 vnet/unix/pcap.h \
735 vnet/unix/tuntap.h \
736 vnet/unix/tapcli.h
737
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400738########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100739# FIB
740########################################
741
742libvnet_la_SOURCES += \
743 vnet/fib/fib.c \
744 vnet/fib/fib_test.c \
745 vnet/fib/ip4_fib.c \
746 vnet/fib/ip6_fib.c \
747 vnet/fib/mpls_fib.c \
748 vnet/fib/fib_table.c \
749 vnet/fib/fib_walk.c \
750 vnet/fib/fib_types.c \
751 vnet/fib/fib_node.c \
752 vnet/fib/fib_node_list.c \
753 vnet/fib/fib_entry.c \
754 vnet/fib/fib_entry_src.c \
755 vnet/fib/fib_entry_src_rr.c \
756 vnet/fib/fib_entry_src_interface.c \
757 vnet/fib/fib_entry_src_default_route.c \
758 vnet/fib/fib_entry_src_special.c \
759 vnet/fib/fib_entry_src_api.c \
760 vnet/fib/fib_entry_src_adj.c \
761 vnet/fib/fib_entry_src_mpls.c \
762 vnet/fib/fib_entry_src_lisp.c \
763 vnet/fib/fib_entry_cover.c \
764 vnet/fib/fib_path_list.c \
765 vnet/fib/fib_path.c \
766 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100767 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100768 vnet/fib/fib_attached_export.c
769
770nobase_include_HEADERS += \
771 vnet/fib/fib.h \
772 vnet/fib/ip4_fib.h \
773 vnet/fib/ip6_fib.h \
774 vnet/fib/fib_types.h \
775 vnet/fib/fib_table.h \
776 vnet/fib/fib_node.h \
777 vnet/fib/fib_node_list.h \
778 vnet/fib/fib_entry.h
779
780########################################
781# ADJ
782########################################
783
784libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100785 vnet/adj/adj_nbr.c \
786 vnet/adj/adj_rewrite.c \
787 vnet/adj/adj_glean.c \
788 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100789 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100790 vnet/adj/adj.c
791
792nobase_include_HEADERS += \
793 vnet/adj/adj.h \
794 vnet/adj/adj_types.h \
795 vnet/adj/adj_rewrite.h \
796 vnet/adj/adj_glean.h \
797 vnet/adj/adj_nbr.h
798
799########################################
800# Data-Plane Objects
801########################################
802
803libvnet_la_SOURCES += \
804 vnet/dpo/dpo.c \
805 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100806 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100807 vnet/dpo/punt_dpo.c \
808 vnet/dpo/receive_dpo.c \
809 vnet/dpo/load_balance.c \
810 vnet/dpo/load_balance_map.c \
811 vnet/dpo/lookup_dpo.c \
812 vnet/dpo/classify_dpo.c \
813 vnet/dpo/mpls_label_dpo.c
814
815nobase_include_HEADERS += \
816 vnet/dpo/load_balance.h \
817 vnet/dpo/drop_dpo.h \
818 vnet/dpo/lookup_dpo.h \
819 vnet/dpo/punt_dpo.h \
820 vnet/dpo/classify_dpo.h \
821 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100822 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100823 vnet/dpo/dpo.h
824
825########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400826# Plugin client library
827########################################
828
829libvnetplugin_la_SOURCES += \
830 vnet/plugin/p1.c
831
832nobase_include_HEADERS += \
833 vnet/plugin/plugin.h
834
835lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700836
Ed Warnickecb9cada2015-12-08 15:45:58 -0700837pcap2pg_SOURCES = \
838 vnet/unix/pcap2pg.c \
839 vnet/unix/pcap.h
840
841pcap2pg_LDFLAGS = -static
842pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
843
844noinst_PROGRAMS += pcap2pg