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@ @IPSEC@ @VCGN@ @IPV6SR@
19 libvnetplugin_la_SOURCES =
20 nobase_include_HEADERS =
23 ########################################
25 ########################################
26 libvnet_la_SOURCES += \
29 vnet/interface_cli.c \
30 vnet/interface_format.c \
31 vnet/interface_output.c \
36 nobase_include_HEADERS += \
42 vnet/interface_funcs.h \
49 ########################################
51 ########################################
53 libvnet_la_SOURCES += \
54 vnet/policer/node_funcs.c \
55 vnet/policer/policer.c \
58 nobase_include_HEADERS += \
59 vnet/policer/police.h \
62 ########################################
64 ########################################
66 libvnet_la_SOURCES += \
69 vnet/cop/ip4_whitelist.c \
70 vnet/cop/ip6_whitelist.c
72 nobase_include_HEADERS += \
75 ########################################
76 # Layer 2 protocols go here
77 ########################################
79 ########################################
80 # Layer 2 protocol: Ethernet
81 ########################################
82 libvnet_la_SOURCES += \
85 vnet/ethernet/format.c \
86 vnet/ethernet/init.c \
87 vnet/ethernet/interface.c \
88 vnet/ethernet/node.c \
91 nobase_include_HEADERS += \
92 vnet/ethernet/arp_packet.h \
93 vnet/ethernet/error.def \
94 vnet/ethernet/ethernet.h \
95 vnet/ethernet/packet.h \
96 vnet/ethernet/types.def
98 ########################################
99 # Layer 2 protocol: Ethernet bridging
100 ########################################
101 libvnet_la_SOURCES += \
102 vnet/l2/feat_bitmap.c \
105 vnet/l2/l2_classify.c \
106 vnet/l2/l2_efp_filter.c \
110 vnet/l2/l2_input_acl.c \
112 vnet/l2/l2_input_vtr.c \
114 vnet/l2/l2_output_acl.c \
115 vnet/l2/l2_output.c \
121 nobase_include_HEADERS += \
122 vnet/l2/feat_bitmap.h \
124 vnet/l2/l2_output.h \
126 vnet/l2/l2_input_vtr.h \
127 vnet/l2/l2_efp_filter.h \
135 vnet/l2/l2_classify.h
137 ########################################
138 # Layer 2 protocol: SRP
139 ########################################
140 libvnet_la_SOURCES += \
142 vnet/srp/interface.c \
146 nobase_include_HEADERS += \
150 ########################################
151 # Layer 2 protocol: PPP
152 ########################################
153 libvnet_la_SOURCES += \
158 nobase_include_HEADERS += \
163 ########################################
164 # Layer 2 protocol: HDLC
165 ########################################
166 libvnet_la_SOURCES += \
171 nobase_include_HEADERS += \
172 vnet/hdlc/error.def \
176 ########################################
177 # Layer 2 protocol: LLC
178 ########################################
179 libvnet_la_SOURCES += \
184 nobase_include_HEADERS += \
187 ########################################
188 # Layer 2 protocol: SNAP
189 ########################################
190 libvnet_la_SOURCES += \
195 nobase_include_HEADERS += \
198 ########################################
200 ########################################
201 libvnet_la_SOURCES += \
206 nobase_include_HEADERS += \
208 vnet/vxlan/vxlan_packet.h \
209 vnet/vxlan/vxlan_error.def
211 ########################################
213 ########################################
214 libvnet_la_SOURCES += \
215 vnet/cdp/cdp_input.c \
216 vnet/cdp/cdp_node.c \
217 vnet/cdp/cdp_periodic.c
219 nobase_include_HEADERS += \
220 vnet/cdp/cdp_protocol.h
222 ########################################
223 # Layer 2/3 "classify"
224 ########################################
225 libvnet_la_SOURCES += \
226 vnet/classify/vnet_classify.c \
227 vnet/classify/ip_classify.c \
228 vnet/classify/input_acl.c \
229 vnet/classify/vnet_classify.h
231 nobase_include_HEADERS += \
232 vnet/classify/vnet_classify.h \
233 vnet/classify/input_acl.h
235 ########################################
236 # Layer 3 protocols go here
237 ########################################
239 ########################################
240 # Layer 3 protocol: IP v4/v6
241 ########################################
242 libvnet_la_SOURCES += \
247 vnet/ip/ip4_format.c \
248 vnet/ip/ip4_forward.c \
249 vnet/ip/ip4_hop_by_hop.c \
250 vnet/ip/ip4_input.c \
251 vnet/ip/ip4_mtrie.c \
253 vnet/ip/ip4_source_check.c \
254 vnet/ip/ip6_format.c \
255 vnet/ip/ip6_forward.c \
256 vnet/ip/ip6_hop_by_hop.c \
257 vnet/ip/ip6_input.c \
258 vnet/ip/ip6_neighbor.c \
260 vnet/ip/ip_checksum.c \
264 vnet/ip/udp_format.c \
266 vnet/ip/udp_local.c \
268 vnet/ip/ip_input_acl.c \
271 nobase_include_HEADERS += \
273 vnet/ip/icmp46_packet.h \
276 vnet/ip/igmp_packet.h \
279 vnet/ip/ip4_mtrie.h \
280 vnet/ip/ip4_error.h \
281 vnet/ip/ip4_packet.h \
283 vnet/ip/ip6_error.h \
284 vnet/ip/ip6_hop_by_hop.h \
285 vnet/ip/ip6_hop_by_hop_packet.h \
286 vnet/ip/ip6_packet.h \
288 vnet/ip/ip_packet.h \
290 vnet/ip/protocols.def \
291 vnet/ip/tcp_packet.h \
293 vnet/ip/udp_error.def \
296 ########################################
297 # Layer 3 protocol: IPSec
298 ########################################
300 libvnet_la_SOURCES += \
302 vnet/ipsec/ipsec_cli.c \
303 vnet/ipsec/ipsec_format.c \
304 vnet/ipsec/ipsec_input.c \
305 vnet/ipsec/ipsec_if.c \
306 vnet/ipsec/ipsec_if_in.c \
307 vnet/ipsec/ipsec_if_out.c \
308 vnet/ipsec/esp_encrypt.c \
309 vnet/ipsec/esp_decrypt.c \
311 vnet/ipsec/ikev2_crypto.c \
312 vnet/ipsec/ikev2_cli.c \
313 vnet/ipsec/ikev2_payload.c \
314 vnet/ipsec/ikev2_format.c
317 libvnet_la_SOURCES += \
318 vnet/ipsec/ipsec_output.c
320 nobase_include_HEADERS += \
324 vnet/ipsec/ikev2_priv.h
326 ########################################
327 # Layer 3 protocol: osi
328 ########################################
329 libvnet_la_SOURCES += \
334 nobase_include_HEADERS += \
337 ########################################
338 # Layer 3 protocol: MAP
339 ########################################
340 libvnet_la_SOURCES += \
345 vnet/map/ip4_sixrd.c \
346 vnet/map/ip6_sixrd.c \
347 vnet/map/ip4_map_t.c \
350 nobase_include_HEADERS += \
354 ########################################
355 # Tunnel protocol: gre
356 ########################################
357 libvnet_la_SOURCES += \
360 vnet/gre/interface.c \
363 nobase_include_HEADERS += \
368 ########################################
369 # Tunnel protocol: l2tpv3
370 ########################################
371 libvnet_la_SOURCES += \
377 nobase_include_HEADERS += \
381 ########################################
382 # Tunnel protocol: gre+mpls
383 ########################################
384 libvnet_la_SOURCES += \
385 vnet/mpls-gre/mpls.c \
386 vnet/mpls-gre/node.c \
387 vnet/mpls-gre/interface.c \
388 vnet/mpls-gre/policy_encap.c \
391 nobase_include_HEADERS += \
392 vnet/mpls-gre/mpls.h \
393 vnet/mpls-gre/packet.h \
394 vnet/mpls-gre/error.def
397 ########################################
398 # Tunnel protocol: nsh-gre
399 ########################################
401 libvnet_la_SOURCES += \
402 vnet/nsh-gre/nsh_gre.c \
403 vnet/nsh-gre/encap.c \
406 nobase_include_HEADERS += \
407 vnet/nsh-gre/nsh_gre.h \
408 vnet/nsh-gre/nsh_gre_packet.h \
409 vnet/nsh-gre/nsh_gre_error.def
411 ########################################
412 # Tunnel protocol: nsh-vxlan-gpe
413 ########################################
415 libvnet_la_SOURCES += \
416 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \
417 vnet/nsh-vxlan-gpe/encap.c \
418 vnet/nsh-vxlan-gpe/decap.c
420 nobase_include_HEADERS += \
421 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \
422 vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \
423 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
425 ########################################
426 # Tunnel protocol: lisp-gpe
427 ########################################
429 libvnet_la_SOURCES += \
430 vnet/lisp-gpe/lisp_gpe.c \
431 vnet/lisp-gpe/encap.c \
432 vnet/lisp-gpe/decap.c
434 nobase_include_HEADERS += \
435 vnet/lisp-gpe/lisp_gpe.h \
436 vnet/lisp-gpe/lisp_gpe_packet.h \
437 vnet/lisp-gpe/lisp_gpe_error.def
439 ########################################
441 ########################################
442 libvnet_la_SOURCES += \
446 nobase_include_HEADERS += \
449 ########################################
451 ########################################
452 libvnet_la_SOURCES += \
453 vnet/dhcp/proxy_node.c \
456 nobase_include_HEADERS += \
459 vnet/dhcp/proxy_error.def
461 ########################################
462 # ipv6 segment routing
463 ########################################
466 libvnet_la_SOURCES += \
470 nobase_include_HEADERS += \
471 vnet/sr/sr_packet.h \
472 vnet/sr/sr_error.def \
475 ########################################
477 #########################################
480 libvnet_la_SOURCES += \
481 vnet/vcgn/cnat_bulk_port.c \
482 vnet/vcgn/cnat_config.c \
483 vnet/vcgn/cnat_db_scanner.c \
484 vnet/vcgn/cnat_db_v2.c \
485 vnet/vcgn/cnat_debug_msg_handler.c \
486 vnet/vcgn/cnat_cli_handler.c \
487 vnet/vcgn/cnat_global.c \
488 vnet/vcgn/cnat_ipv4_udp_inside_input.c \
489 vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \
490 vnet/vcgn/cnat_ipv4_udp_outside_input.c \
491 vnet/vcgn/cnat_ipv4_tcp_inside_input.c \
492 vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \
493 vnet/vcgn/cnat_ipv4_tcp_outside_input.c \
494 vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \
495 vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \
496 vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \
497 vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \
498 vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \
499 vnet/vcgn/cnat_logging.c \
500 vnet/vcgn/cnat_ports.c \
501 vnet/vcgn/cnat_util.c \
502 vnet/vcgn/cnat_show.c \
503 vnet/vcgn/cnat_syslog.c \
504 vnet/vcgn/cnat_v4_functions.c \
505 vnet/vcgn/index_list.c \
506 vnet/vcgn/spp_platform_trace_log.c \
507 vnet/vcgn/vcgn_classify.c
510 ########################################
512 ########################################
513 libvnet_la_SOURCES += \
514 vnet/dhcpv6/proxy_node.c
516 nobase_include_HEADERS += \
517 vnet/dhcpv6/packet.h \
518 vnet/dhcpv6/proxy.h \
519 vnet/dhcpv6/proxy_error.def
521 ########################################
522 # IPFIX / netflow v10
523 ########################################
524 libvnet_la_SOURCES += \
525 vnet/flow/flow_report.c
527 nobase_include_HEADERS += \
528 vnet/flow/flow_report.h \
529 vnet/flow/ipfix_info_elements.h \
530 vnet/flow/ipfix_packet.h
532 ########################################
534 ########################################
536 libvnet_la_SOURCES += \
537 vnet/flow/flow_report_sample.c
539 nobase_include_HEADERS += \
540 vnet/flow/flow_report_sample.h
542 ########################################
544 ########################################
546 libvnet_la_SOURCES += \
547 vnet/lawful-intercept/lawful_intercept.c \
548 vnet/lawful-intercept/node.c
550 nobase_include_HEADERS += \
551 vnet/dpdk_replication.h \
552 vnet/lawful-intercept/lawful_intercept.h
554 ########################################
556 ########################################
558 libvnet_la_SOURCES += \
566 nobase_include_HEADERS += \
570 ########################################
572 ########################################
574 libvnet_la_SOURCES += \
575 vnet/devices/dpdk/dpdk_priv.h \
576 vnet/devices/dpdk/device.c \
577 vnet/devices/dpdk/format.c \
578 vnet/devices/dpdk/init.c \
579 vnet/devices/dpdk/node.c \
580 vnet/devices/dpdk/threads.c \
581 vnet/devices/dpdk/vhost_user.c \
582 vnet/devices/dpdk/cli.c
584 nobase_include_HEADERS += \
585 vnet/devices/dpdk/dpdk.h \
586 vnet/devices/dpdk/threads.h
589 ########################################
591 ########################################
594 libvnet_la_SOURCES += \
595 vnet/devices/virtio/vhost-user.c
597 nobase_include_HEADERS += \
598 vnet/devices/virtio/vhost-user.h
601 ########################################
603 ########################################
604 libvnet_la_SOURCES += \
605 vnet/devices/ssvm/ssvm_eth.c \
606 vnet/devices/ssvm/node.c
608 nobase_include_HEADERS += \
609 vnet/devices/ssvm/ssvm_eth.h
611 ########################################
612 # Linux packet interface
613 ########################################
615 libvnet_la_SOURCES += \
616 vnet/devices/af_packet/af_packet.c \
617 vnet/devices/af_packet/device.c \
618 vnet/devices/af_packet/node.c \
619 vnet/devices/af_packet/cli.c
621 nobase_include_HEADERS += \
622 vnet/devices/af_packet/af_packet.h
624 ########################################
625 # Unix kernel related
626 ########################################
628 # FIXME: vnet/unix/hgshm.c
630 libvnet_la_SOURCES += \
631 vnet/unix/gdb_funcs.c \
636 nobase_include_HEADERS += \
641 ########################################
642 # Plugin client library
643 ########################################
645 libvnetplugin_la_SOURCES += \
648 nobase_include_HEADERS += \
651 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
656 dpdk_libs += -l:libdpdk.a
660 vnet/unix/pcap2pg.c \
663 pcap2pg_LDFLAGS = -static
664 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
666 noinst_PROGRAMS += pcap2pg