1 # 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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 AUTOMAKE_OPTIONS = foreign subdir-objects
16 AM_CFLAGS = -Wall @DPDK@ @VIRL@
19 libvnetplugin_la_SOURCES =
20 nobase_include_HEADERS =
22 ########################################
24 ########################################
25 libvnet_la_SOURCES += \
28 vnet/interface_cli.c \
29 vnet/interface_format.c \
30 vnet/interface_output.c \
35 nobase_include_HEADERS += \
41 vnet/interface_funcs.h \
48 ########################################
50 ########################################
52 libvnet_la_SOURCES += \
53 vnet/policer/node_funcs.c \
54 vnet/policer/policer.c \
57 nobase_include_HEADERS += \
58 vnet/policer/police.h \
62 ########################################
63 # Layer 2 protocols go here
64 ########################################
66 ########################################
67 # Layer 2 protocol: Ethernet
68 ########################################
69 libvnet_la_SOURCES += \
72 vnet/ethernet/format.c \
73 vnet/ethernet/init.c \
74 vnet/ethernet/interface.c \
75 vnet/ethernet/node.c \
78 nobase_include_HEADERS += \
79 vnet/ethernet/arp_packet.h \
80 vnet/ethernet/error.def \
81 vnet/ethernet/ethernet.h \
82 vnet/ethernet/packet.h \
83 vnet/ethernet/types.def
85 ########################################
86 # Layer 2 protocol: Ethernet bridging
87 ########################################
88 libvnet_la_SOURCES += \
89 vnet/l2/feat_bitmap.c \
92 vnet/l2/l2_classify.c \
93 vnet/l2/l2_efp_filter.c \
97 vnet/l2/l2_input_acl.c \
99 vnet/l2/l2_input_vtr.c \
101 vnet/l2/l2_output_acl.c \
102 vnet/l2/l2_output.c \
107 nobase_include_HEADERS += \
108 vnet/l2/feat_bitmap.h \
110 vnet/l2/l2_output.h \
112 vnet/l2/l2_input_vtr.h \
113 vnet/l2/l2_efp_filter.h \
120 vnet/l2/l2_classify.h
122 ########################################
123 # Layer 2 protocol: SRP
124 ########################################
125 libvnet_la_SOURCES += \
127 vnet/srp/interface.c \
131 nobase_include_HEADERS += \
135 ########################################
136 # Layer 2 protocol: PPP
137 ########################################
138 libvnet_la_SOURCES += \
143 nobase_include_HEADERS += \
148 ########################################
149 # Layer 2 protocol: HDLC
150 ########################################
151 libvnet_la_SOURCES += \
156 nobase_include_HEADERS += \
157 vnet/hdlc/error.def \
161 ########################################
162 # Layer 2 protocol: LLC
163 ########################################
164 libvnet_la_SOURCES += \
169 nobase_include_HEADERS += \
172 ########################################
173 # Layer 2 protocol: SNAP
174 ########################################
175 libvnet_la_SOURCES += \
180 nobase_include_HEADERS += \
183 ########################################
185 ########################################
186 libvnet_la_SOURCES += \
191 nobase_include_HEADERS += \
193 vnet/vxlan/vxlan_packet.h \
194 vnet/vxlan/vxlan_error.def
196 ########################################
197 # Layer 2/3 "classify"
198 ########################################
199 libvnet_la_SOURCES += \
200 vnet/classify/vnet_classify.c \
201 vnet/classify/ip_classify.c \
202 vnet/classify/input_acl.c \
203 vnet/classify/vnet_classify.h
205 nobase_include_HEADERS += \
206 vnet/classify/vnet_classify.h \
207 vnet/classify/input_acl.h
209 ########################################
210 # Layer 3 protocols go here
211 ########################################
214 # vnet/ip/tcp_format.c \
215 # vnet/ip/tcp_init.c \
219 ########################################
220 # Layer 3 protocol: IP v4/v6
221 ########################################
222 libvnet_la_SOURCES += \
227 vnet/ip/ip4_format.c \
228 vnet/ip/ip4_forward.c \
229 vnet/ip/ip4_hop_by_hop.c \
230 vnet/ip/ip4_input.c \
231 vnet/ip/ip4_mtrie.c \
233 vnet/ip/ip4_source_check.c \
234 vnet/ip/ip6_format.c \
235 vnet/ip/ip6_forward.c \
236 vnet/ip/ip6_hop_by_hop.c \
237 vnet/ip/ip6_input.c \
238 vnet/ip/ip6_neighbor.c \
240 vnet/ip/ip_checksum.c \
244 vnet/ip/udp_format.c \
246 vnet/ip/udp_local.c \
248 vnet/ip/ip_input_acl.c \
251 nobase_include_HEADERS += \
253 vnet/ip/icmp46_packet.h \
255 vnet/ip/igmp_packet.h \
258 vnet/ip/ip4_mtrie.h \
259 vnet/ip/ip4_error.h \
260 vnet/ip/ip4_packet.h \
262 vnet/ip/ip6_error.h \
263 vnet/ip/ip6_hop_by_hop.h \
264 vnet/ip/ip6_hop_by_hop_packet.h \
265 vnet/ip/ip6_packet.h \
267 vnet/ip/ip_packet.h \
269 vnet/ip/protocols.def \
271 vnet/ip/tcp_packet.h \
273 vnet/ip/udp_error.def \
276 ########################################
277 # Layer 3 protocol: IPSec
278 ########################################
280 libvnet_la_SOURCES += \
282 vnet/ipsec/ipsec_cli.c \
283 vnet/ipsec/ipsec_format.c \
284 vnet/ipsec/ipsec_output.c \
285 vnet/ipsec/ipsec_input.c \
286 vnet/ipsec/ipsec_if.c \
287 vnet/ipsec/ipsec_if_in.c \
288 vnet/ipsec/ipsec_if_out.c \
289 vnet/ipsec/esp_encrypt.c \
290 vnet/ipsec/esp_decrypt.c \
292 vnet/ipsec/ikev2_crypto.c \
293 vnet/ipsec/ikev2_cli.c \
294 vnet/ipsec/ikev2_payload.c \
295 vnet/ipsec/ikev2_format.c
297 nobase_include_HEADERS += \
301 vnet/ipsec/ikev2_priv.h
304 ########################################
305 # Layer 3 protocol: osi
306 ########################################
307 libvnet_la_SOURCES += \
312 nobase_include_HEADERS += \
315 ########################################
316 # Layer 3 protocol: MAP
317 ########################################
318 libvnet_la_SOURCES += \
323 vnet/map/ip4_sixrd.c \
324 vnet/map/ip6_sixrd.c \
325 vnet/map/ip4_map_t.c \
328 nobase_include_HEADERS += \
332 ########################################
333 # Tunnel protocol: gre
334 ########################################
335 libvnet_la_SOURCES += \
338 vnet/gre/interface.c \
341 nobase_include_HEADERS += \
346 ########################################
347 # Tunnel protocol: l2tpv3
348 ########################################
349 libvnet_la_SOURCES += \
355 nobase_include_HEADERS += \
359 ########################################
360 # Tunnel protocol: gre+mpls
361 ########################################
362 libvnet_la_SOURCES += \
363 vnet/mpls-gre/mpls.c \
364 vnet/mpls-gre/node.c \
365 vnet/mpls-gre/interface.c \
366 vnet/mpls-gre/policy_encap.c \
369 nobase_include_HEADERS += \
370 vnet/mpls-gre/mpls.h \
371 vnet/mpls-gre/packet.h \
372 vnet/mpls-gre/error.def
375 ########################################
376 # Tunnel protocol: nsh-gre
377 ########################################
379 libvnet_la_SOURCES += \
380 vnet/nsh-gre/nsh_gre.c \
381 vnet/nsh-gre/encap.c \
384 nobase_include_HEADERS += \
385 vnet/nsh-gre/nsh_gre.h \
386 vnet/nsh-gre/nsh_gre_packet.h \
387 vnet/nsh-gre/nsh_gre_error.def
389 ########################################
390 # Tunnel protocol: nsh-vxlan-gpe
391 ########################################
393 libvnet_la_SOURCES += \
394 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \
395 vnet/nsh-vxlan-gpe/encap.c \
396 vnet/nsh-vxlan-gpe/decap.c
398 nobase_include_HEADERS += \
399 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \
400 vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \
401 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
403 ########################################
404 # Tunnel protocol: lisp-gpe
405 ########################################
407 libvnet_la_SOURCES += \
408 vnet/lisp-gpe/lisp_gpe.c \
409 vnet/lisp-gpe/encap.c \
410 vnet/lisp-gpe/decap.c
412 nobase_include_HEADERS += \
413 vnet/lisp-gpe/lisp_gpe.h \
414 vnet/lisp-gpe/lisp_gpe_packet.h \
415 vnet/lisp-gpe/lisp_gpe_error.def
417 ########################################
419 ########################################
420 libvnet_la_SOURCES += \
424 nobase_include_HEADERS += \
427 ########################################
429 ########################################
430 libvnet_la_SOURCES += \
431 vnet/dhcp/proxy_node.c \
434 nobase_include_HEADERS += \
437 vnet/dhcp/proxy_error.def
439 ########################################
440 # ipv6 segment routing
441 ########################################
442 libvnet_la_SOURCES += \
445 nobase_include_HEADERS += \
446 vnet/sr/sr_packet.h \
447 vnet/sr/sr_error.def \
450 ########################################
452 #########################################
453 libvnet_la_SOURCES += \
454 vnet/vcgn/cnat_bulk_port.c \
455 vnet/vcgn/cnat_config.c \
456 vnet/vcgn/cnat_db_scanner.c \
457 vnet/vcgn/cnat_db_v2.c \
458 vnet/vcgn/cnat_debug_msg_handler.c \
459 vnet/vcgn/cnat_cli_handler.c \
460 vnet/vcgn/cnat_global.c \
461 vnet/vcgn/cnat_ipv4_udp_inside_input.c \
462 vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \
463 vnet/vcgn/cnat_ipv4_udp_outside_input.c \
464 vnet/vcgn/cnat_ipv4_tcp_inside_input.c \
465 vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \
466 vnet/vcgn/cnat_ipv4_tcp_outside_input.c \
467 vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \
468 vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \
469 vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \
470 vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \
471 vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \
472 vnet/vcgn/cnat_logging.c \
473 vnet/vcgn/cnat_ports.c \
474 vnet/vcgn/cnat_util.c \
475 vnet/vcgn/cnat_show.c \
476 vnet/vcgn/cnat_syslog.c \
477 vnet/vcgn/cnat_v4_functions.c \
478 vnet/vcgn/index_list.c \
479 vnet/vcgn/spp_platform_trace_log.c \
480 vnet/vcgn/vcgn_classify.c
482 ########################################
484 ########################################
485 libvnet_la_SOURCES += \
486 vnet/dhcpv6/proxy_node.c
488 nobase_include_HEADERS += \
489 vnet/dhcpv6/packet.h \
490 vnet/dhcpv6/proxy.h \
491 vnet/dhcpv6/proxy_error.def
493 ########################################
494 # IPFIX / netflow v10
495 ########################################
496 libvnet_la_SOURCES += \
497 vnet/flow/flow_report.c
499 nobase_include_HEADERS += \
500 vnet/flow/flow_report.h \
501 vnet/flow/ipfix_info_elements.h \
502 vnet/flow/ipfix_packet.h
504 ########################################
506 ########################################
508 libvnet_la_SOURCES += \
509 vnet/flow/flow_report_sample.c
511 nobase_include_HEADERS += \
512 vnet/flow/flow_report_sample.h
514 ########################################
516 ########################################
518 libvnet_la_SOURCES += \
519 vnet/lawful-intercept/lawful_intercept.c \
520 vnet/lawful-intercept/node.c
522 nobase_include_HEADERS += \
523 vnet/dpdk_replication.h \
524 vnet/lawful-intercept/lawful_intercept.h
526 ########################################
528 ########################################
530 libvnet_la_SOURCES += \
538 nobase_include_HEADERS += \
542 ########################################
544 ########################################
546 libvnet_la_SOURCES += \
547 vnet/devices/dpdk/dpdk_priv.h \
548 vnet/devices/dpdk/device.c \
549 vnet/devices/dpdk/init.c \
550 vnet/devices/dpdk/node.c \
551 vnet/devices/dpdk/threads.c \
552 vnet/devices/dpdk/vhost_user.c \
553 vnet/devices/dpdk/cli.c
555 nobase_include_HEADERS += \
556 vnet/devices/dpdk/dpdk.h \
557 vnet/devices/dpdk/threads.h
560 ########################################
562 ########################################
565 libvnet_la_SOURCES += \
566 vnet/devices/virtio/vhost-user.c
568 nobase_include_HEADERS += \
569 vnet/devices/virtio/vhost-user.h
572 ########################################
574 ########################################
575 libvnet_la_SOURCES += \
576 vnet/devices/ssvm/ssvm_eth.c \
577 vnet/devices/ssvm/node.c
579 nobase_include_HEADERS += \
580 vnet/devices/ssvm/ssvm_eth.h
582 ########################################
583 # Unix kernel related
584 ########################################
586 # FIXME: vnet/unix/hgshm.c
588 libvnet_la_SOURCES += \
589 vnet/unix/gdb_funcs.c \
594 nobase_include_HEADERS += \
599 ########################################
600 # Plugin client library
601 ########################################
603 libvnetplugin_la_SOURCES += \
606 nobase_include_HEADERS += \
609 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
611 noinst_PROGRAMS = vnet_unix
613 vnet_unix_SOURCES = \
616 vnet_unix_LDFLAGS = -static
620 dpdk_libs += -l:libdpdk.a
623 vnet_unix_LDADD = libvnet.la -l:libvlib_unix.a -l:libvlib.a -l:libvppinfra.a -lpthread -lvlibapi -lvlibmemory -lsvm -lm -ldl $(dpdk_libs) -lrt
626 vnet/unix/pcap2pg.c \
629 pcap2pg_LDFLAGS = -static
630 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
632 noinst_PROGRAMS += pcap2pg