blob: 7cf19eb81560e173d7ae9a9778b0e65653c15fd3 [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
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +000016AM_CFLAGS = -Wall -Werror @DPDK@ @DPDK_CRYPTO@ @IPSEC@ @IPV6SR@
Ed Warnickecb9cada2015-12-08 15:45:58 -070017
Matus Fabianf468e232016-12-02 06:00:53 -080018BUILT_SOURCES = vnet/interface.api.h vnet/interface.api.json vnet/l2/l2.api.h \
19 vnet/l2/l2.api.json
Dave Barachaff70772016-10-31 11:59:07 -040020
Ed Warnickecb9cada2015-12-08 15:45:58 -070021libvnet_la_SOURCES =
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -040022libvnetplugin_la_SOURCES =
Ed Warnickecb9cada2015-12-08 15:45:58 -070023nobase_include_HEADERS =
Dave Barach4e281a42015-12-14 11:13:29 -050024noinst_PROGRAMS =
Filip Tehlar254b0362016-04-07 10:04:34 +020025TESTS =
Ed Warnickecb9cada2015-12-08 15:45:58 -070026
Ole Troand575e692016-08-25 12:26:47 +020027dpdk_libs =
28if WITH_DPDK
29dpdk_libs += -l:libdpdk.a
30endif
31
Ed Warnickecb9cada2015-12-08 15:45:58 -070032########################################
33# Generic stuff
34########################################
35libvnet_la_SOURCES += \
36 vnet/config.c \
Damjan Marion51327ac2016-11-09 11:59:42 +010037 vnet/devices/devices.c \
Damjan Marion0247b462016-06-08 01:37:11 +020038 vnet/handoff.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070039 vnet/interface.c \
Dave Barachaff70772016-10-31 11:59:07 -040040 vnet/interface_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -070041 vnet/interface_cli.c \
42 vnet/interface_format.c \
43 vnet/interface_output.c \
44 vnet/misc.c \
45 vnet/replication.c \
46 vnet/rewrite.c
47
48nobase_include_HEADERS += \
49 vnet/api_errno.h \
50 vnet/buffer.h \
51 vnet/config.h \
Damjan Marion8bdc63b2016-11-02 14:48:21 +010052 vnet/devices/devices.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070053 vnet/global_funcs.h \
Damjan Marion0247b462016-06-08 01:37:11 +020054 vnet/handoff.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070055 vnet/interface.h \
Dave Barachaff70772016-10-31 11:59:07 -040056 vnet/interface.api.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070057 vnet/interface_funcs.h \
58 vnet/l3_types.h \
59 vnet/pipeline.h \
60 vnet/replication.h \
61 vnet/rewrite.h \
Dave Barachaff70772016-10-31 11:59:07 -040062 vnet/vnet.h \
63 vnet/vnet_all_api_h.h \
64 vnet/vnet_msg_enum.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070065
66########################################
67# Policer infra
68########################################
69
70libvnet_la_SOURCES += \
71 vnet/policer/node_funcs.c \
72 vnet/policer/policer.c \
73 vnet/policer/xlate.c
74
75nobase_include_HEADERS += \
76 vnet/policer/police.h \
Matus Fabian65fcd4d2016-05-13 05:44:48 -070077 vnet/policer/policer.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -070078 vnet/policer/xlate.h
79
Dave Barachc07bf5d2016-02-17 17:52:26 -050080########################################
81# Cop - junk filter
82########################################
83
84libvnet_la_SOURCES += \
85 vnet/cop/cop.c \
86 vnet/cop/node1.c \
87 vnet/cop/ip4_whitelist.c \
88 vnet/cop/ip6_whitelist.c
89
90nobase_include_HEADERS += \
91 vnet/cop/cop.h
Ed Warnickecb9cada2015-12-08 15:45:58 -070092
93########################################
94# Layer 2 protocols go here
95########################################
96
97########################################
98# Layer 2 protocol: Ethernet
99########################################
100libvnet_la_SOURCES += \
101 vnet/ethernet/arp.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700102 vnet/ethernet/format.c \
103 vnet/ethernet/init.c \
104 vnet/ethernet/interface.c \
105 vnet/ethernet/node.c \
106 vnet/ethernet/pg.c
107
108nobase_include_HEADERS += \
109 vnet/ethernet/arp_packet.h \
110 vnet/ethernet/error.def \
111 vnet/ethernet/ethernet.h \
112 vnet/ethernet/packet.h \
113 vnet/ethernet/types.def
114
115########################################
116# Layer 2 protocol: Ethernet bridging
117########################################
118libvnet_la_SOURCES += \
119 vnet/l2/feat_bitmap.c \
Matus Fabianf468e232016-12-02 06:00:53 -0800120 vnet/l2/l2_api.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700121 vnet/l2/l2_bd.c \
122 vnet/l2/l2_bvi.c \
Dave Barachb84a3e52016-08-30 17:01:52 -0400123 vnet/l2/l2_input_classify.c \
124 vnet/l2/l2_output_classify.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700125 vnet/l2/l2_efp_filter.c \
126 vnet/l2/l2_fib.c \
127 vnet/l2/l2_flood.c \
128 vnet/l2/l2_fwd.c \
129 vnet/l2/l2_input_acl.c \
130 vnet/l2/l2_input.c \
131 vnet/l2/l2_input_vtr.c \
132 vnet/l2/l2_learn.c \
133 vnet/l2/l2_output_acl.c \
134 vnet/l2/l2_output.c \
135 vnet/l2/l2_patch.c \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000136 vnet/l2/l2_rw.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700137 vnet/l2/l2_vtr.c \
138 vnet/l2/l2_xcrw.c
139
140nobase_include_HEADERS += \
141 vnet/l2/feat_bitmap.h \
142 vnet/l2/l2_input.h \
143 vnet/l2/l2_output.h \
144 vnet/l2/l2_vtr.h \
145 vnet/l2/l2_input_vtr.h \
146 vnet/l2/l2_efp_filter.h \
147 vnet/l2/l2_fwd.h \
148 vnet/l2/l2_bd.h \
149 vnet/l2/l2_bvi.h \
150 vnet/l2/l2_flood.h \
151 vnet/l2/l2_fib.h \
Pierre Pfisterd6f5b962016-03-21 16:17:52 +0000152 vnet/l2/l2_rw.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700153 vnet/l2/l2_xcrw.h \
Matus Fabianf468e232016-12-02 06:00:53 -0800154 vnet/l2/l2_classify.h \
155 vnet/l2/l2.api.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700156
157########################################
158# Layer 2 protocol: SRP
159########################################
160libvnet_la_SOURCES += \
161 vnet/srp/format.c \
162 vnet/srp/interface.c \
163 vnet/srp/node.c \
164 vnet/srp/pg.c
165
166nobase_include_HEADERS += \
167 vnet/srp/packet.h \
168 vnet/srp/srp.h
169
170########################################
171# Layer 2 protocol: PPP
172########################################
173libvnet_la_SOURCES += \
174 vnet/ppp/node.c \
175 vnet/ppp/pg.c \
176 vnet/ppp/ppp.c
177
178nobase_include_HEADERS += \
179 vnet/ppp/error.def \
180 vnet/ppp/ppp.h \
181 vnet/ppp/packet.h
182
183########################################
184# Layer 2 protocol: HDLC
185########################################
186libvnet_la_SOURCES += \
187 vnet/hdlc/node.c \
188 vnet/hdlc/pg.c \
189 vnet/hdlc/hdlc.c
190
191nobase_include_HEADERS += \
192 vnet/hdlc/error.def \
193 vnet/hdlc/hdlc.h \
194 vnet/hdlc/packet.h
195
196########################################
197# Layer 2 protocol: LLC
198########################################
199libvnet_la_SOURCES += \
200 vnet/llc/llc.c \
201 vnet/llc/node.c \
202 vnet/llc/pg.c
203
204nobase_include_HEADERS += \
205 vnet/llc/llc.h
206
207########################################
208# Layer 2 protocol: SNAP
209########################################
210libvnet_la_SOURCES += \
211 vnet/snap/snap.c \
212 vnet/snap/node.c \
213 vnet/snap/pg.c
214
215nobase_include_HEADERS += \
216 vnet/snap/snap.h
217
218########################################
219# Layer 2 / vxlan
220########################################
221libvnet_la_SOURCES += \
222 vnet/vxlan/vxlan.c \
223 vnet/vxlan/encap.c \
224 vnet/vxlan/decap.c
225
226nobase_include_HEADERS += \
227 vnet/vxlan/vxlan.h \
Dave Barachced48e72016-02-08 15:57:35 -0500228 vnet/vxlan/vxlan_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700229 vnet/vxlan/vxlan_error.def
230
231########################################
Dave Barachced48e72016-02-08 15:57:35 -0500232# Layer 2 / CDP
233########################################
234libvnet_la_SOURCES += \
235 vnet/cdp/cdp_input.c \
236 vnet/cdp/cdp_node.c \
237 vnet/cdp/cdp_periodic.c
238
239nobase_include_HEADERS += \
240 vnet/cdp/cdp_protocol.h
241
242########################################
Klement Sekerade4582b2016-09-13 12:27:08 +0200243# Layer 2 / LLDP
244########################################
245libvnet_la_SOURCES += \
246 vnet/lldp/lldp_input.c \
247 vnet/lldp/lldp_node.c \
248 vnet/lldp/lldp_output.c \
249 vnet/lldp/lldp_cli.c
250
251nobase_include_HEADERS += \
252 vnet/lldp/lldp_protocol.h
253
254########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700255# Layer 2/3 "classify"
256########################################
257libvnet_la_SOURCES += \
258 vnet/classify/vnet_classify.c \
259 vnet/classify/ip_classify.c \
260 vnet/classify/input_acl.c \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700261 vnet/classify/policer_classify.c \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700262 vnet/classify/flow_classify.c \
263 vnet/classify/flow_classify_node.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700264 vnet/classify/vnet_classify.h
265
266nobase_include_HEADERS += \
267 vnet/classify/vnet_classify.h \
Matus Fabian70e6a8d2016-06-20 08:10:42 -0700268 vnet/classify/input_acl.h \
Juraj Sloboda506b2452016-08-07 23:45:24 -0700269 vnet/classify/policer_classify.h \
270 vnet/classify/flow_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700271
272########################################
273# Layer 3 protocols go here
274########################################
275
Ed Warnickecb9cada2015-12-08 15:45:58 -0700276########################################
277# Layer 3 protocol: IP v4/v6
278########################################
279libvnet_la_SOURCES += \
280 vnet/ip/format.c \
281 vnet/ip/icmp4.c \
282 vnet/ip/icmp6.c \
283 vnet/ip/ip46_cli.c \
284 vnet/ip/ip4_format.c \
285 vnet/ip/ip4_forward.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700286 vnet/ip/ip4_input.c \
287 vnet/ip/ip4_mtrie.c \
288 vnet/ip/ip4_pg.c \
Dave Barach6f9bca22016-04-30 10:25:32 -0400289 vnet/ip/ip4_source_and_port_range_check.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200290 vnet/ip/ip4_source_check.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700291 vnet/ip/ip6_format.c \
292 vnet/ip/ip6_forward.c \
293 vnet/ip/ip6_hop_by_hop.c \
294 vnet/ip/ip6_input.c \
295 vnet/ip/ip6_neighbor.c \
296 vnet/ip/ip6_pg.c \
297 vnet/ip/ip_checksum.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200298 vnet/ip/ip_frag.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700299 vnet/ip/ip.h \
300 vnet/ip/ip_init.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200301 vnet/ip/ip_input_acl.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700302 vnet/ip/lookup.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200303 vnet/ip/ping.c \
304 vnet/ip/punt.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700305 vnet/ip/udp_format.c \
306 vnet/ip/udp_init.c \
307 vnet/ip/udp_local.c \
Damjan Marion770930c2016-10-13 14:10:10 +0200308 vnet/ip/udp_pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700309
310nobase_include_HEADERS += \
311 vnet/ip/format.h \
312 vnet/ip/icmp46_packet.h \
Ole Troan92eade12016-01-13 20:17:08 +0100313 vnet/ip/icmp4.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700314 vnet/ip/icmp6.h \
315 vnet/ip/igmp_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200316 vnet/ip/ip4_error.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700317 vnet/ip/ip4.h \
318 vnet/ip/ip4_mtrie.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700319 vnet/ip/ip4_packet.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700320 vnet/ip/ip6_error.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200321 vnet/ip/ip6.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700322 vnet/ip/ip6_hop_by_hop.h \
323 vnet/ip/ip6_hop_by_hop_packet.h \
324 vnet/ip/ip6_packet.h \
Pavel Kotucek3e046ea2016-12-05 08:27:37 +0100325 vnet/ip/ip6_neighbor.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200326 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700327 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200328 vnet/ip/ip_source_and_port_range_check.h \
329 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700330 vnet/ip/ports.def \
331 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700332 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200333 vnet/ip/punt.h \
334 vnet/ip/tcp_packet.h \
335 vnet/ip/udp_error.def \
336 vnet/ip/udp.h \
337 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700338
339########################################
340# Layer 3 protocol: IPSec
341########################################
Dave Barach61efa142016-01-22 08:23:09 -0500342if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700343libvnet_la_SOURCES += \
344 vnet/ipsec/ipsec.c \
345 vnet/ipsec/ipsec_cli.c \
346 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700347 vnet/ipsec/ipsec_input.c \
348 vnet/ipsec/ipsec_if.c \
349 vnet/ipsec/ipsec_if_in.c \
350 vnet/ipsec/ipsec_if_out.c \
351 vnet/ipsec/esp_encrypt.c \
352 vnet/ipsec/esp_decrypt.c \
353 vnet/ipsec/ikev2.c \
354 vnet/ipsec/ikev2_crypto.c \
355 vnet/ipsec/ikev2_cli.c \
356 vnet/ipsec/ikev2_payload.c \
357 vnet/ipsec/ikev2_format.c
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000358if WITH_DPDK_CRYPTO
359libvnet_la_SOURCES += \
360 vnet/devices/dpdk/ipsec/esp_encrypt.c \
361 vnet/devices/dpdk/ipsec/esp_decrypt.c \
362 vnet/devices/dpdk/ipsec/crypto_node.c \
363 vnet/devices/dpdk/ipsec/cli.c \
364 vnet/devices/dpdk/ipsec/ipsec.c
365endif
366endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700367
Damjan Marione936bbe2016-02-25 23:17:38 +0100368libvnet_la_SOURCES += \
369 vnet/ipsec/ipsec_output.c
370
Ed Warnickecb9cada2015-12-08 15:45:58 -0700371nobase_include_HEADERS += \
372 vnet/ipsec/ipsec.h \
373 vnet/ipsec/esp.h \
374 vnet/ipsec/ikev2.h \
375 vnet/ipsec/ikev2_priv.h
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000376if WITH_DPDK_CRYPTO
377nobase_include_HEADERS += \
378 vnet/devices/dpdk/ipsec/ipsec.h \
379 vnet/devices/dpdk/ipsec/esp.h
380endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700381
382########################################
383# Layer 3 protocol: osi
384########################################
385libvnet_la_SOURCES += \
386 vnet/osi/node.c \
387 vnet/osi/osi.c \
388 vnet/osi/pg.c
389
390nobase_include_HEADERS += \
391 vnet/osi/osi.h
392
393########################################
394# Layer 3 protocol: MAP
395########################################
396libvnet_la_SOURCES += \
397 vnet/map/map.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100398 vnet/map/map_dpo.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700399 vnet/map/ip4_map.c \
400 vnet/map/ip6_map.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700401 vnet/map/ip4_map_t.c \
402 vnet/map/ip6_map_t.c
403
404nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100405 vnet/map/map.h \
406 vnet/map/map_dpo.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700407
Ole Troand575e692016-08-25 12:26:47 +0200408if ENABLE_TESTS
409TESTS += test_map
410test_map_SOURCES = \
411 vnet/map/test.c
412test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
413
414test_map_LDADD = libvnet.la -lvppinfra -lvlib \
415 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
416 -ldl -lsvm -lrt
417
418test_map_LDFLAGS = -static
419endif
420
421
Ed Warnickecb9cada2015-12-08 15:45:58 -0700422########################################
423# Tunnel protocol: gre
424########################################
425libvnet_la_SOURCES += \
426 vnet/gre/gre.c \
427 vnet/gre/node.c \
428 vnet/gre/interface.c \
429 vnet/gre/pg.c
430
431nobase_include_HEADERS += \
432 vnet/gre/gre.h \
433 vnet/gre/packet.h \
434 vnet/gre/error.def
435
436########################################
437# Tunnel protocol: l2tpv3
438########################################
439libvnet_la_SOURCES += \
440 vnet/l2tp/l2tp.c \
441 vnet/l2tp/encap.c \
442 vnet/l2tp/decap.c \
443 vnet/l2tp/pg.c
444
445nobase_include_HEADERS += \
446 vnet/l2tp/l2tp.h \
447 vnet/l2tp/packet.h
448
449########################################
450# Tunnel protocol: gre+mpls
451########################################
452libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100453 vnet/mpls/mpls.c \
454 vnet/mpls/mpls_lookup.c \
455 vnet/mpls/mpls_output.c \
456 vnet/mpls/mpls_features.c \
457 vnet/mpls/node.c \
458 vnet/mpls/interface.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000459 vnet/mpls/mpls_tunnel.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100460 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700461
462nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100463 vnet/mpls/mpls.h \
464 vnet/mpls/mpls_types.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000465 vnet/mpls/mpls_tunnel.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100466 vnet/mpls/packet.h \
467 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700468
469
470########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700471# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700472########################################
473
474libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700475 vnet/vxlan-gpe/vxlan_gpe.c \
476 vnet/vxlan-gpe/encap.c \
477 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700478
479nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700480 vnet/vxlan-gpe/vxlan_gpe.h \
481 vnet/vxlan-gpe/vxlan_gpe_packet.h \
482 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700483
484########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700485# Tunnel protocol: ipsec+gre
486########################################
487libvnet_la_SOURCES += \
488 vnet/ipsec-gre/ipsec_gre.c \
489 vnet/ipsec-gre/node.c \
490 vnet/ipsec-gre/interface.c
491
492nobase_include_HEADERS += \
493 vnet/ipsec-gre/ipsec_gre.h \
494 vnet/ipsec-gre/error.def
495
496########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100497# LISP control plane: lisp-cp
498########################################
499
500libvnet_la_SOURCES += \
501 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100502 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100503 vnet/lisp-cp/control.c \
504 vnet/lisp-cp/gid_dictionary.c \
505 vnet/lisp-cp/lisp_msg_serdes.c \
506 vnet/lisp-cp/packets.c
507
508nobase_include_HEADERS += \
509 vnet/lisp-cp/lisp_types.h \
510 vnet/lisp-cp/packets.h \
511 vnet/lisp-cp/gid_dictionary.h \
512 vnet/lisp-cp/lisp_cp_messages.h \
513 vnet/lisp-cp/lisp_msg_serdes.h \
514 vnet/lisp-cp/control.h
515
Filip Tehlar254b0362016-04-07 10:04:34 +0200516
517if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200518LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200519 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
520
521TESTS += test_cp_serdes test_lisp_types
522
523test_cp_serdes_SOURCES = \
524 test/lisp-cp/test_cp_serdes.c \
525 vnet/lisp-cp/lisp_msg_serdes.c \
526 vnet/lisp-cp/lisp_types.c \
527 vnet/lisp-cp/packets.c \
528 vnet/ip/ip_checksum.c
529
530test_lisp_types_SOURCES = \
531 test/lisp-cp/test_lisp_types.c \
532 vnet/lisp-cp/lisp_types.c
533
534test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
535test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
536
537test_cp_serdes_LDADD = libvnet.la $(LDS)
538test_lisp_types_LDADD = libvnet.la $(LDS)
539
540test_cp_serdes_LDFLAGS = -static
541test_lisp_types_LDFLAGS = -static
542endif
543
Florin Corase127a7e2016-02-18 22:20:01 +0100544########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700545# Tunnel protocol: lisp-gpe
546########################################
547
548libvnet_la_SOURCES += \
549 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100550 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
551 vnet/lisp-gpe/lisp_gpe_adjacency.c \
552 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100553 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
554 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200555 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100556 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700557
558nobase_include_HEADERS += \
559 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100560 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
561 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700562 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100563 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700564
Filip Tehlar254b0362016-04-07 10:04:34 +0200565if ENABLE_TESTS
566TESTS += test_test
567
568test_test_SOURCES = test/lisp-gpe/test.c
569
570test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
571
572test_test_LDADD = $(LIBOBJS)
573
574noinst_PROGRAMS += $(TESTS)
575check_PROGRAMS = $(TESTS)
576endif
577
Ed Warnickecb9cada2015-12-08 15:45:58 -0700578########################################
579# DHCP client
580########################################
581libvnet_la_SOURCES += \
582 vnet/dhcp/client.c \
583 vnet/dhcp/client.h
584
585nobase_include_HEADERS += \
586 vnet/dhcp/client.h
587
588########################################
589# DHCP proxy
590########################################
591libvnet_la_SOURCES += \
592 vnet/dhcp/proxy_node.c \
593 vnet/dhcp/proxy.h
594
595nobase_include_HEADERS += \
596 vnet/dhcp/packet.h \
597 vnet/dhcp/proxy.h \
598 vnet/dhcp/proxy_error.def
599
600########################################
601# ipv6 segment routing
602########################################
Dave Barach61efa142016-01-22 08:23:09 -0500603
604if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700605libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700606 vnet/sr/sr.c \
607 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500608endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700609
610nobase_include_HEADERS += \
611 vnet/sr/sr_packet.h \
612 vnet/sr/sr_error.def \
613 vnet/sr/sr.h
614
615########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700616# DHCPv6 proxy
617########################################
618libvnet_la_SOURCES += \
619 vnet/dhcpv6/proxy_node.c
620
621nobase_include_HEADERS += \
622 vnet/dhcpv6/packet.h \
623 vnet/dhcpv6/proxy.h \
624 vnet/dhcpv6/proxy_error.def
625
626########################################
627# IPFIX / netflow v10
628########################################
629libvnet_la_SOURCES += \
630 vnet/flow/flow_report.c
631
632nobase_include_HEADERS += \
633 vnet/flow/flow_report.h \
634 vnet/flow/ipfix_info_elements.h \
635 vnet/flow/ipfix_packet.h
636
637########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700638# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700639########################################
640
641libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700642 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700643
644nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700645 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700646
647########################################
648# lawful intercept
649########################################
650
651libvnet_la_SOURCES += \
652 vnet/lawful-intercept/lawful_intercept.c \
653 vnet/lawful-intercept/node.c
654
655nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700656 vnet/lawful-intercept/lawful_intercept.h
657
658########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100659# SPAN (port mirroring)
660########################################
661
662libvnet_la_SOURCES += \
663 vnet/span/span.c \
664 vnet/span/node.c
665
666nobase_include_HEADERS += \
667 vnet/span/span.h
668
669########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700670# Packet generator
671########################################
672
673libvnet_la_SOURCES += \
674 vnet/pg/cli.c \
675 vnet/pg/edit.c \
676 vnet/pg/init.c \
677 vnet/pg/input.c \
678 vnet/pg/output.c \
679 vnet/pg/stream.c
680
681nobase_include_HEADERS += \
682 vnet/pg/pg.h \
683 vnet/pg/edit.h
684
685########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000686# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700687########################################
688if WITH_DPDK
689libvnet_la_SOURCES += \
690 vnet/devices/dpdk/dpdk_priv.h \
691 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100692 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700693 vnet/devices/dpdk/init.c \
694 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100695 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700696 vnet/devices/dpdk/cli.c
697
698nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200699 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200700else
701libvnet_la_SOURCES += \
702 vnet/devices/nic/ixge.c \
703 vnet/devices/nic/ixge.h \
704 vnet/devices/nic/sfp.c \
705 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700706endif
707
708########################################
709# virtio
710########################################
711
Ed Warnickecb9cada2015-12-08 15:45:58 -0700712libvnet_la_SOURCES += \
713 vnet/devices/virtio/vhost-user.c
714
715nobase_include_HEADERS += \
716 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700717
718########################################
719# ssvm ethernet
720########################################
721libvnet_la_SOURCES += \
722 vnet/devices/ssvm/ssvm_eth.c \
723 vnet/devices/ssvm/node.c
724
725nobase_include_HEADERS += \
726 vnet/devices/ssvm/ssvm_eth.h
727
728########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100729# Linux packet interface
730########################################
731
732libvnet_la_SOURCES += \
733 vnet/devices/af_packet/af_packet.c \
734 vnet/devices/af_packet/device.c \
735 vnet/devices/af_packet/node.c \
736 vnet/devices/af_packet/cli.c
737
738nobase_include_HEADERS += \
739 vnet/devices/af_packet/af_packet.h
740
741########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200742# NETMAP interface
743########################################
744
745libvnet_la_SOURCES += \
746 vnet/devices/netmap/netmap.c \
747 vnet/devices/netmap/device.c \
748 vnet/devices/netmap/node.c \
749 vnet/devices/netmap/cli.c
750
751nobase_include_HEADERS += \
752 vnet/devices/netmap/netmap.h
753
754
755########################################
Damjan Marion22311502016-10-28 20:30:15 +0200756# Driver feature graph arc support
757########################################
758
759libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200760 vnet/feature/feature.c \
761 vnet/feature/registration.c
762
763nobase_include_HEADERS += \
764 vnet/feature/feature.h
765
766########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700767# Unix kernel related
768########################################
769
770# FIXME: vnet/unix/hgshm.c
771
772libvnet_la_SOURCES += \
773 vnet/unix/gdb_funcs.c \
774 vnet/unix/pcap.c \
775 vnet/unix/tapcli.c \
776 vnet/unix/tuntap.c
777
778nobase_include_HEADERS += \
779 vnet/unix/pcap.h \
780 vnet/unix/tuntap.h \
781 vnet/unix/tapcli.h
782
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400783########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100784# FIB
785########################################
786
787libvnet_la_SOURCES += \
788 vnet/fib/fib.c \
789 vnet/fib/fib_test.c \
790 vnet/fib/ip4_fib.c \
791 vnet/fib/ip6_fib.c \
792 vnet/fib/mpls_fib.c \
793 vnet/fib/fib_table.c \
794 vnet/fib/fib_walk.c \
795 vnet/fib/fib_types.c \
796 vnet/fib/fib_node.c \
797 vnet/fib/fib_node_list.c \
798 vnet/fib/fib_entry.c \
799 vnet/fib/fib_entry_src.c \
800 vnet/fib/fib_entry_src_rr.c \
801 vnet/fib/fib_entry_src_interface.c \
802 vnet/fib/fib_entry_src_default_route.c \
803 vnet/fib/fib_entry_src_special.c \
804 vnet/fib/fib_entry_src_api.c \
805 vnet/fib/fib_entry_src_adj.c \
806 vnet/fib/fib_entry_src_mpls.c \
807 vnet/fib/fib_entry_src_lisp.c \
808 vnet/fib/fib_entry_cover.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000809 vnet/fib/fib_entry_delegate.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100810 vnet/fib/fib_path_list.c \
811 vnet/fib/fib_path.c \
812 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100813 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100814 vnet/fib/fib_attached_export.c
815
816nobase_include_HEADERS += \
817 vnet/fib/fib.h \
818 vnet/fib/ip4_fib.h \
819 vnet/fib/ip6_fib.h \
820 vnet/fib/fib_types.h \
821 vnet/fib/fib_table.h \
822 vnet/fib/fib_node.h \
823 vnet/fib/fib_node_list.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000824 vnet/fib/fib_entry.h \
825 vnet/fib/fib_entry_delegate.h
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100826
827########################################
828# ADJ
829########################################
830
831libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100832 vnet/adj/adj_nbr.c \
833 vnet/adj/adj_rewrite.c \
834 vnet/adj/adj_glean.c \
835 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100836 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100837 vnet/adj/adj.c
838
839nobase_include_HEADERS += \
840 vnet/adj/adj.h \
841 vnet/adj/adj_types.h \
842 vnet/adj/adj_rewrite.h \
843 vnet/adj/adj_glean.h \
844 vnet/adj/adj_nbr.h
845
846########################################
847# Data-Plane Objects
848########################################
849
850libvnet_la_SOURCES += \
851 vnet/dpo/dpo.c \
852 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100853 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100854 vnet/dpo/punt_dpo.c \
855 vnet/dpo/receive_dpo.c \
856 vnet/dpo/load_balance.c \
857 vnet/dpo/load_balance_map.c \
858 vnet/dpo/lookup_dpo.c \
859 vnet/dpo/classify_dpo.c \
860 vnet/dpo/mpls_label_dpo.c
861
862nobase_include_HEADERS += \
863 vnet/dpo/load_balance.h \
864 vnet/dpo/drop_dpo.h \
865 vnet/dpo/lookup_dpo.h \
866 vnet/dpo/punt_dpo.h \
867 vnet/dpo/classify_dpo.h \
868 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100869 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100870 vnet/dpo/dpo.h
871
872########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400873# Plugin client library
874########################################
875
876libvnetplugin_la_SOURCES += \
877 vnet/plugin/p1.c
878
879nobase_include_HEADERS += \
880 vnet/plugin/plugin.h
881
882lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700883
Ed Warnickecb9cada2015-12-08 15:45:58 -0700884pcap2pg_SOURCES = \
885 vnet/unix/pcap2pg.c \
886 vnet/unix/pcap.h
887
888pcap2pg_LDFLAGS = -static
889pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
890
891noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400892
893# Set the suffix list
Ole Troanf14e3bf2016-12-01 21:49:03 +0100894SUFFIXES = .api.h .api .api.json
Dave Barachaff70772016-10-31 11:59:07 -0400895
896# install the API definition, so we can produce java bindings, etc.
897
Ole Troanf14e3bf2016-12-01 21:49:03 +0100898apidir = $(prefix)/vnet
Matus Fabianf468e232016-12-02 06:00:53 -0800899api_DATA = vnet/interface.api.json vnet/l2/l2.api.json
Dave Barachaff70772016-10-31 11:59:07 -0400900
901# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
902# and requires a symbolic link at the top of the vnet source tree
903
904include $(top_srcdir)/suffix-rules.mk