blob: fc91bcd2a7a1fe120196e6ce8a5f7503340fb08a [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 \
Damjan Marion770930c2016-10-13 14:10:10 +0200325 vnet/ip/ip.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700326 vnet/ip/ip_packet.h \
Damjan Marion770930c2016-10-13 14:10:10 +0200327 vnet/ip/ip_source_and_port_range_check.h \
328 vnet/ip/lookup.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700329 vnet/ip/ports.def \
330 vnet/ip/protocols.def \
Alexander Popovsky (apopovsk)4a7e58b2016-10-05 22:31:23 -0700331 vnet/ip/punt_error.def \
Damjan Marion770930c2016-10-13 14:10:10 +0200332 vnet/ip/punt.h \
333 vnet/ip/tcp_packet.h \
334 vnet/ip/udp_error.def \
335 vnet/ip/udp.h \
336 vnet/ip/udp_packet.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700337
338########################################
339# Layer 3 protocol: IPSec
340########################################
Dave Barach61efa142016-01-22 08:23:09 -0500341if WITH_IPSEC
Ed Warnickecb9cada2015-12-08 15:45:58 -0700342libvnet_la_SOURCES += \
343 vnet/ipsec/ipsec.c \
344 vnet/ipsec/ipsec_cli.c \
345 vnet/ipsec/ipsec_format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700346 vnet/ipsec/ipsec_input.c \
347 vnet/ipsec/ipsec_if.c \
348 vnet/ipsec/ipsec_if_in.c \
349 vnet/ipsec/ipsec_if_out.c \
350 vnet/ipsec/esp_encrypt.c \
351 vnet/ipsec/esp_decrypt.c \
352 vnet/ipsec/ikev2.c \
353 vnet/ipsec/ikev2_crypto.c \
354 vnet/ipsec/ikev2_cli.c \
355 vnet/ipsec/ikev2_payload.c \
356 vnet/ipsec/ikev2_format.c
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000357if WITH_DPDK_CRYPTO
358libvnet_la_SOURCES += \
359 vnet/devices/dpdk/ipsec/esp_encrypt.c \
360 vnet/devices/dpdk/ipsec/esp_decrypt.c \
361 vnet/devices/dpdk/ipsec/crypto_node.c \
362 vnet/devices/dpdk/ipsec/cli.c \
363 vnet/devices/dpdk/ipsec/ipsec.c
364endif
365endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700366
Damjan Marione936bbe2016-02-25 23:17:38 +0100367libvnet_la_SOURCES += \
368 vnet/ipsec/ipsec_output.c
369
Ed Warnickecb9cada2015-12-08 15:45:58 -0700370nobase_include_HEADERS += \
371 vnet/ipsec/ipsec.h \
372 vnet/ipsec/esp.h \
373 vnet/ipsec/ikev2.h \
374 vnet/ipsec/ikev2_priv.h
Sergio Gonzalez Monroya10f62b2016-11-25 13:36:12 +0000375if WITH_DPDK_CRYPTO
376nobase_include_HEADERS += \
377 vnet/devices/dpdk/ipsec/ipsec.h \
378 vnet/devices/dpdk/ipsec/esp.h
379endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700380
381########################################
382# Layer 3 protocol: osi
383########################################
384libvnet_la_SOURCES += \
385 vnet/osi/node.c \
386 vnet/osi/osi.c \
387 vnet/osi/pg.c
388
389nobase_include_HEADERS += \
390 vnet/osi/osi.h
391
392########################################
393# Layer 3 protocol: MAP
394########################################
395libvnet_la_SOURCES += \
396 vnet/map/map.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100397 vnet/map/map_dpo.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700398 vnet/map/ip4_map.c \
399 vnet/map/ip6_map.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700400 vnet/map/ip4_map_t.c \
401 vnet/map/ip6_map_t.c
402
403nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100404 vnet/map/map.h \
405 vnet/map/map_dpo.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700406
Ole Troand575e692016-08-25 12:26:47 +0200407if ENABLE_TESTS
408TESTS += test_map
409test_map_SOURCES = \
410 vnet/map/test.c
411test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
412
413test_map_LDADD = libvnet.la -lvppinfra -lvlib \
414 -lpthread -lvlibmemory -lvlibapi -lvlib_unix \
415 -ldl -lsvm -lrt
416
417test_map_LDFLAGS = -static
418endif
419
420
Ed Warnickecb9cada2015-12-08 15:45:58 -0700421########################################
422# Tunnel protocol: gre
423########################################
424libvnet_la_SOURCES += \
425 vnet/gre/gre.c \
426 vnet/gre/node.c \
427 vnet/gre/interface.c \
428 vnet/gre/pg.c
429
430nobase_include_HEADERS += \
431 vnet/gre/gre.h \
432 vnet/gre/packet.h \
433 vnet/gre/error.def
434
435########################################
436# Tunnel protocol: l2tpv3
437########################################
438libvnet_la_SOURCES += \
439 vnet/l2tp/l2tp.c \
440 vnet/l2tp/encap.c \
441 vnet/l2tp/decap.c \
442 vnet/l2tp/pg.c
443
444nobase_include_HEADERS += \
445 vnet/l2tp/l2tp.h \
446 vnet/l2tp/packet.h
447
448########################################
449# Tunnel protocol: gre+mpls
450########################################
451libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100452 vnet/mpls/mpls.c \
453 vnet/mpls/mpls_lookup.c \
454 vnet/mpls/mpls_output.c \
455 vnet/mpls/mpls_features.c \
456 vnet/mpls/node.c \
457 vnet/mpls/interface.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000458 vnet/mpls/mpls_tunnel.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100459 vnet/mpls/pg.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700460
461nobase_include_HEADERS += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100462 vnet/mpls/mpls.h \
463 vnet/mpls/mpls_types.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000464 vnet/mpls/mpls_tunnel.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100465 vnet/mpls/packet.h \
466 vnet/mpls/error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700467
468
469########################################
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700470# Tunnel protocol: vxlan-gpe
Ed Warnickecb9cada2015-12-08 15:45:58 -0700471########################################
472
473libvnet_la_SOURCES += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700474 vnet/vxlan-gpe/vxlan_gpe.c \
475 vnet/vxlan-gpe/encap.c \
476 vnet/vxlan-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700477
478nobase_include_HEADERS += \
Keith Burns (alagalah)94b14422016-05-05 18:16:50 -0700479 vnet/vxlan-gpe/vxlan_gpe.h \
480 vnet/vxlan-gpe/vxlan_gpe_packet.h \
481 vnet/vxlan-gpe/vxlan_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700482
483########################################
Matus Fabian694265d2016-08-10 01:55:36 -0700484# Tunnel protocol: ipsec+gre
485########################################
486libvnet_la_SOURCES += \
487 vnet/ipsec-gre/ipsec_gre.c \
488 vnet/ipsec-gre/node.c \
489 vnet/ipsec-gre/interface.c
490
491nobase_include_HEADERS += \
492 vnet/ipsec-gre/ipsec_gre.h \
493 vnet/ipsec-gre/error.def
494
495########################################
Florin Corase127a7e2016-02-18 22:20:01 +0100496# LISP control plane: lisp-cp
497########################################
498
499libvnet_la_SOURCES += \
500 vnet/lisp-cp/lisp_types.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100501 vnet/lisp-cp/lisp_cp_dpo.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100502 vnet/lisp-cp/control.c \
503 vnet/lisp-cp/gid_dictionary.c \
504 vnet/lisp-cp/lisp_msg_serdes.c \
505 vnet/lisp-cp/packets.c
506
507nobase_include_HEADERS += \
508 vnet/lisp-cp/lisp_types.h \
509 vnet/lisp-cp/packets.h \
510 vnet/lisp-cp/gid_dictionary.h \
511 vnet/lisp-cp/lisp_cp_messages.h \
512 vnet/lisp-cp/lisp_msg_serdes.h \
513 vnet/lisp-cp/control.h
514
Filip Tehlar254b0362016-04-07 10:04:34 +0200515
516if ENABLE_TESTS
Ole Troand575e692016-08-25 12:26:47 +0200517LDS = -lvppinfra -l:libvlib.a $(dpdk_libs) -l:libvlibmemory.a \
Filip Tehlar254b0362016-04-07 10:04:34 +0200518 -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
519
520TESTS += test_cp_serdes test_lisp_types
521
522test_cp_serdes_SOURCES = \
523 test/lisp-cp/test_cp_serdes.c \
524 vnet/lisp-cp/lisp_msg_serdes.c \
525 vnet/lisp-cp/lisp_types.c \
526 vnet/lisp-cp/packets.c \
527 vnet/ip/ip_checksum.c
528
529test_lisp_types_SOURCES = \
530 test/lisp-cp/test_lisp_types.c \
531 vnet/lisp-cp/lisp_types.c
532
533test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
534test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
535
536test_cp_serdes_LDADD = libvnet.la $(LDS)
537test_lisp_types_LDADD = libvnet.la $(LDS)
538
539test_cp_serdes_LDFLAGS = -static
540test_lisp_types_LDFLAGS = -static
541endif
542
Florin Corase127a7e2016-02-18 22:20:01 +0100543########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700544# Tunnel protocol: lisp-gpe
545########################################
546
547libvnet_la_SOURCES += \
548 vnet/lisp-gpe/lisp_gpe.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100549 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
550 vnet/lisp-gpe/lisp_gpe_adjacency.c \
551 vnet/lisp-gpe/lisp_gpe_tunnel.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100552 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
553 vnet/lisp-gpe/lisp_gpe_tenant.c \
Florin Coras577c3552016-04-21 00:45:40 +0200554 vnet/lisp-gpe/interface.c \
Florin Corase127a7e2016-02-18 22:20:01 +0100555 vnet/lisp-gpe/decap.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700556
557nobase_include_HEADERS += \
558 vnet/lisp-gpe/lisp_gpe.h \
Neale Ranns5e575b12016-10-03 09:40:25 +0100559 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
560 vnet/lisp-gpe/lisp_gpe_tenant.h \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700561 vnet/lisp-gpe/lisp_gpe_packet.h \
Florin Corase127a7e2016-02-18 22:20:01 +0100562 vnet/lisp-gpe/lisp_gpe_error.def
Ed Warnickecb9cada2015-12-08 15:45:58 -0700563
Filip Tehlar254b0362016-04-07 10:04:34 +0200564if ENABLE_TESTS
565TESTS += test_test
566
567test_test_SOURCES = test/lisp-gpe/test.c
568
569test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
570
571test_test_LDADD = $(LIBOBJS)
572
573noinst_PROGRAMS += $(TESTS)
574check_PROGRAMS = $(TESTS)
575endif
576
Ed Warnickecb9cada2015-12-08 15:45:58 -0700577########################################
578# DHCP client
579########################################
580libvnet_la_SOURCES += \
581 vnet/dhcp/client.c \
582 vnet/dhcp/client.h
583
584nobase_include_HEADERS += \
585 vnet/dhcp/client.h
586
587########################################
588# DHCP proxy
589########################################
590libvnet_la_SOURCES += \
591 vnet/dhcp/proxy_node.c \
592 vnet/dhcp/proxy.h
593
594nobase_include_HEADERS += \
595 vnet/dhcp/packet.h \
596 vnet/dhcp/proxy.h \
597 vnet/dhcp/proxy_error.def
598
599########################################
600# ipv6 segment routing
601########################################
Dave Barach61efa142016-01-22 08:23:09 -0500602
603if WITH_IPV6SR
Ed Warnickecb9cada2015-12-08 15:45:58 -0700604libvnet_la_SOURCES += \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -0700605 vnet/sr/sr.c \
606 vnet/sr/sr_replicate.c
Dave Barach61efa142016-01-22 08:23:09 -0500607endif
Ed Warnickecb9cada2015-12-08 15:45:58 -0700608
609nobase_include_HEADERS += \
610 vnet/sr/sr_packet.h \
611 vnet/sr/sr_error.def \
612 vnet/sr/sr.h
613
614########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700615# DHCPv6 proxy
616########################################
617libvnet_la_SOURCES += \
618 vnet/dhcpv6/proxy_node.c
619
620nobase_include_HEADERS += \
621 vnet/dhcpv6/packet.h \
622 vnet/dhcpv6/proxy.h \
623 vnet/dhcpv6/proxy_error.def
624
625########################################
626# IPFIX / netflow v10
627########################################
628libvnet_la_SOURCES += \
629 vnet/flow/flow_report.c
630
631nobase_include_HEADERS += \
632 vnet/flow/flow_report.h \
633 vnet/flow/ipfix_info_elements.h \
634 vnet/flow/ipfix_packet.h
635
636########################################
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700637# IPFIX classify code
Ed Warnickecb9cada2015-12-08 15:45:58 -0700638########################################
639
640libvnet_la_SOURCES += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700641 vnet/flow/flow_report_classify.c
Ed Warnickecb9cada2015-12-08 15:45:58 -0700642
643nobase_include_HEADERS += \
Juraj Sloboda819ec6f2016-08-07 23:40:03 -0700644 vnet/flow/flow_report_classify.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700645
646########################################
647# lawful intercept
648########################################
649
650libvnet_la_SOURCES += \
651 vnet/lawful-intercept/lawful_intercept.c \
652 vnet/lawful-intercept/node.c
653
654nobase_include_HEADERS += \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700655 vnet/lawful-intercept/lawful_intercept.h
656
657########################################
Pavel Kotucekf6e3dc42016-11-04 09:58:01 +0100658# SPAN (port mirroring)
659########################################
660
661libvnet_la_SOURCES += \
662 vnet/span/span.c \
663 vnet/span/node.c
664
665nobase_include_HEADERS += \
666 vnet/span/span.h
667
668########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700669# Packet generator
670########################################
671
672libvnet_la_SOURCES += \
673 vnet/pg/cli.c \
674 vnet/pg/edit.c \
675 vnet/pg/init.c \
676 vnet/pg/input.c \
677 vnet/pg/output.c \
678 vnet/pg/stream.c
679
680nobase_include_HEADERS += \
681 vnet/pg/pg.h \
682 vnet/pg/edit.h
683
684########################################
Padraig Connolly999bbc42016-11-15 09:35:50 +0000685# DPDK
Ed Warnickecb9cada2015-12-08 15:45:58 -0700686########################################
687if WITH_DPDK
688libvnet_la_SOURCES += \
689 vnet/devices/dpdk/dpdk_priv.h \
690 vnet/devices/dpdk/device.c \
Damjan Marion7f620972016-02-25 16:00:11 +0100691 vnet/devices/dpdk/format.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700692 vnet/devices/dpdk/init.c \
693 vnet/devices/dpdk/node.c \
Jasvinder Singh85ecc812016-07-21 17:02:19 +0100694 vnet/devices/dpdk/hqos.c \
Ed Warnickecb9cada2015-12-08 15:45:58 -0700695 vnet/devices/dpdk/cli.c
696
697nobase_include_HEADERS += \
Damjan Marion0f8ecf02016-06-27 08:30:30 +0200698 vnet/devices/dpdk/dpdk.h
Damjan Marionb4d89272016-05-12 22:14:45 +0200699else
700libvnet_la_SOURCES += \
701 vnet/devices/nic/ixge.c \
702 vnet/devices/nic/ixge.h \
703 vnet/devices/nic/sfp.c \
704 vnet/devices/nic/sfp.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700705endif
706
707########################################
708# virtio
709########################################
710
Ed Warnickecb9cada2015-12-08 15:45:58 -0700711libvnet_la_SOURCES += \
712 vnet/devices/virtio/vhost-user.c
713
714nobase_include_HEADERS += \
715 vnet/devices/virtio/vhost-user.h
Ed Warnickecb9cada2015-12-08 15:45:58 -0700716
717########################################
718# ssvm ethernet
719########################################
720libvnet_la_SOURCES += \
721 vnet/devices/ssvm/ssvm_eth.c \
722 vnet/devices/ssvm/node.c
723
724nobase_include_HEADERS += \
725 vnet/devices/ssvm/ssvm_eth.h
726
727########################################
Damjan Marion83243a02016-02-29 13:09:30 +0100728# Linux packet interface
729########################################
730
731libvnet_la_SOURCES += \
732 vnet/devices/af_packet/af_packet.c \
733 vnet/devices/af_packet/device.c \
734 vnet/devices/af_packet/node.c \
735 vnet/devices/af_packet/cli.c
736
737nobase_include_HEADERS += \
738 vnet/devices/af_packet/af_packet.h
739
740########################################
Damjan Marion108c7312016-04-20 05:04:20 +0200741# NETMAP interface
742########################################
743
744libvnet_la_SOURCES += \
745 vnet/devices/netmap/netmap.c \
746 vnet/devices/netmap/device.c \
747 vnet/devices/netmap/node.c \
748 vnet/devices/netmap/cli.c
749
750nobase_include_HEADERS += \
751 vnet/devices/netmap/netmap.h
752
753
754########################################
Damjan Marion22311502016-10-28 20:30:15 +0200755# Driver feature graph arc support
756########################################
757
758libvnet_la_SOURCES += \
Damjan Marion22311502016-10-28 20:30:15 +0200759 vnet/feature/feature.c \
760 vnet/feature/registration.c
761
762nobase_include_HEADERS += \
763 vnet/feature/feature.h
764
765########################################
Ed Warnickecb9cada2015-12-08 15:45:58 -0700766# Unix kernel related
767########################################
768
769# FIXME: vnet/unix/hgshm.c
770
771libvnet_la_SOURCES += \
772 vnet/unix/gdb_funcs.c \
773 vnet/unix/pcap.c \
774 vnet/unix/tapcli.c \
775 vnet/unix/tuntap.c
776
777nobase_include_HEADERS += \
778 vnet/unix/pcap.h \
779 vnet/unix/tuntap.h \
780 vnet/unix/tapcli.h
781
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400782########################################
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100783# FIB
784########################################
785
786libvnet_la_SOURCES += \
787 vnet/fib/fib.c \
788 vnet/fib/fib_test.c \
789 vnet/fib/ip4_fib.c \
790 vnet/fib/ip6_fib.c \
791 vnet/fib/mpls_fib.c \
792 vnet/fib/fib_table.c \
793 vnet/fib/fib_walk.c \
794 vnet/fib/fib_types.c \
795 vnet/fib/fib_node.c \
796 vnet/fib/fib_node_list.c \
797 vnet/fib/fib_entry.c \
798 vnet/fib/fib_entry_src.c \
799 vnet/fib/fib_entry_src_rr.c \
800 vnet/fib/fib_entry_src_interface.c \
801 vnet/fib/fib_entry_src_default_route.c \
802 vnet/fib/fib_entry_src_special.c \
803 vnet/fib/fib_entry_src_api.c \
804 vnet/fib/fib_entry_src_adj.c \
805 vnet/fib/fib_entry_src_mpls.c \
806 vnet/fib/fib_entry_src_lisp.c \
807 vnet/fib/fib_entry_cover.c \
Neale Rannsad422ed2016-11-02 14:20:04 +0000808 vnet/fib/fib_entry_delegate.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100809 vnet/fib/fib_path_list.c \
810 vnet/fib/fib_path.c \
811 vnet/fib/fib_path_ext.c \
Neale Ranns3ee44042016-10-03 13:05:48 +0100812 vnet/fib/fib_urpf_list.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100813 vnet/fib/fib_attached_export.c
814
815nobase_include_HEADERS += \
816 vnet/fib/fib.h \
817 vnet/fib/ip4_fib.h \
818 vnet/fib/ip6_fib.h \
819 vnet/fib/fib_types.h \
820 vnet/fib/fib_table.h \
821 vnet/fib/fib_node.h \
822 vnet/fib/fib_node_list.h \
Neale Rannsad422ed2016-11-02 14:20:04 +0000823 vnet/fib/fib_entry.h \
824 vnet/fib/fib_entry_delegate.h
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100825
826########################################
827# ADJ
828########################################
829
830libvnet_la_SOURCES += \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100831 vnet/adj/adj_nbr.c \
832 vnet/adj/adj_rewrite.c \
833 vnet/adj/adj_glean.c \
834 vnet/adj/adj_midchain.c \
Neale Ranns5e575b12016-10-03 09:40:25 +0100835 vnet/adj/adj_l2.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100836 vnet/adj/adj.c
837
838nobase_include_HEADERS += \
839 vnet/adj/adj.h \
840 vnet/adj/adj_types.h \
841 vnet/adj/adj_rewrite.h \
842 vnet/adj/adj_glean.h \
843 vnet/adj/adj_nbr.h
844
845########################################
846# Data-Plane Objects
847########################################
848
849libvnet_la_SOURCES += \
850 vnet/dpo/dpo.c \
851 vnet/dpo/drop_dpo.c \
Neale Ranns948e00f2016-10-20 13:39:34 +0100852 vnet/dpo/ip_null_dpo.c \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100853 vnet/dpo/punt_dpo.c \
854 vnet/dpo/receive_dpo.c \
855 vnet/dpo/load_balance.c \
856 vnet/dpo/load_balance_map.c \
857 vnet/dpo/lookup_dpo.c \
858 vnet/dpo/classify_dpo.c \
859 vnet/dpo/mpls_label_dpo.c
860
861nobase_include_HEADERS += \
862 vnet/dpo/load_balance.h \
863 vnet/dpo/drop_dpo.h \
864 vnet/dpo/lookup_dpo.h \
865 vnet/dpo/punt_dpo.h \
866 vnet/dpo/classify_dpo.h \
867 vnet/dpo/receive_dpo.h \
Neale Ranns948e00f2016-10-20 13:39:34 +0100868 vnet/dpo/ip_null_dpo.h \
Neale Ranns0bfe5d82016-08-25 15:29:12 +0100869 vnet/dpo/dpo.h
870
871########################################
Todd Foggoa4ea4ecd2016-03-17 14:22:34 -0400872# Plugin client library
873########################################
874
875libvnetplugin_la_SOURCES += \
876 vnet/plugin/p1.c
877
878nobase_include_HEADERS += \
879 vnet/plugin/plugin.h
880
881lib_LTLIBRARIES = libvnet.la libvnetplugin.la
Ed Warnickecb9cada2015-12-08 15:45:58 -0700882
Ed Warnickecb9cada2015-12-08 15:45:58 -0700883pcap2pg_SOURCES = \
884 vnet/unix/pcap2pg.c \
885 vnet/unix/pcap.h
886
887pcap2pg_LDFLAGS = -static
888pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
889
890noinst_PROGRAMS += pcap2pg
Dave Barachaff70772016-10-31 11:59:07 -0400891
892# Set the suffix list
Ole Troanf14e3bf2016-12-01 21:49:03 +0100893SUFFIXES = .api.h .api .api.json
Dave Barachaff70772016-10-31 11:59:07 -0400894
895# install the API definition, so we can produce java bindings, etc.
896
Ole Troanf14e3bf2016-12-01 21:49:03 +0100897apidir = $(prefix)/vnet
Matus Fabianf468e232016-12-02 06:00:53 -0800898api_DATA = vnet/interface.api.json vnet/l2/l2.api.json
Dave Barachaff70772016-10-31 11:59:07 -0400899
900# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
901# and requires a symbolic link at the top of the vnet source tree
902
903include $(top_srcdir)/suffix-rules.mk