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 lib_LTLIBRARIES += libvnet.la
18 libvnet_la_DEPENDENCIES = \
24 libvnet_multiversioning_sources =
26 libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt
29 libvnet_la_LIBADD += -lcrypto
32 ########################################
34 ########################################
35 libvnet_la_SOURCES += \
38 vnet/devices/devices.c \
39 vnet/devices/netlink.c \
41 vnet/flow/flow_cli.c \
44 vnet/interface_api.c \
45 vnet/interface_cli.c \
46 vnet/interface_format.c \
47 vnet/interface_output.c \
48 vnet/interface_stats.c \
52 nobase_include_HEADERS += \
56 vnet/devices/devices.h \
57 vnet/devices/netlink.h \
62 vnet/interface.api.h \
63 vnet/interface_funcs.h \
64 vnet/ip/ip4_to_ip6.h \
65 vnet/ip/ip6_to_ip4.h \
70 vnet/vnet_all_api_h.h \
71 vnet/vnet_msg_enum.h \
75 API_FILES += vnet/interface.api
77 ########################################
79 ########################################
81 libvnet_la_SOURCES += \
82 vnet/policer/node_funcs.c \
83 vnet/policer/policer.c \
84 vnet/policer/xlate.c \
85 vnet/policer/policer_api.c
87 nobase_include_HEADERS += \
88 vnet/policer/police.h \
89 vnet/policer/policer.h \
90 vnet/policer/xlate.h \
91 vnet/policer/policer.api.h
93 API_FILES += vnet/policer/policer.api
95 ########################################
97 ########################################
99 libvnet_la_SOURCES += \
102 vnet/cop/ip4_whitelist.c \
103 vnet/cop/ip6_whitelist.c \
106 nobase_include_HEADERS += \
110 API_FILES += vnet/cop/cop.api
112 ########################################
113 # Layer 2 protocols go here
114 ########################################
116 ########################################
117 # Layer 2 protocol: Ethernet
118 ########################################
119 libvnet_la_SOURCES += \
120 vnet/ethernet/format.c \
121 vnet/ethernet/init.c \
122 vnet/ethernet/interface.c \
123 vnet/ethernet/mac_address.c \
124 vnet/ethernet/node.c \
126 vnet/ethernet/sfp.c \
127 vnet/ethernet/p2p_ethernet.c \
128 vnet/ethernet/p2p_ethernet_input.c \
129 vnet/ethernet/p2p_ethernet_api.c
131 libvnet_multiversioning_sources += \
134 nobase_include_HEADERS += \
135 vnet/ethernet/error.def \
136 vnet/ethernet/ethernet.h \
137 vnet/ethernet/packet.h \
138 vnet/ethernet/types.def \
139 vnet/ethernet/sfp.h \
140 vnet/ethernet/p2p_ethernet.api.h \
141 vnet/ethernet/p2p_ethernet.h
144 vnet/ethernet/p2p_ethernet.api \
145 vnet/ethernet/ethernet_types.api
147 ########################################
148 # Layer 2 protocol: Ethernet bridging
149 ########################################
150 libvnet_la_SOURCES += \
151 vnet/l2/feat_bitmap.c \
155 vnet/l2/l2_input_classify.c \
156 vnet/l2/l2_output_classify.c \
157 vnet/l2/l2_efp_filter.c \
162 vnet/l2/l2_input_vtr.c \
164 vnet/l2/l2_output.c \
165 vnet/l2/l2_in_out_acl.c \
171 nobase_include_HEADERS += \
172 vnet/l2/feat_bitmap.h \
174 vnet/l2/l2_output.h \
176 vnet/l2/l2_input_vtr.h \
177 vnet/l2/l2_efp_filter.h \
185 vnet/l2/l2_classify.h \
188 API_FILES += vnet/l2/l2.api
190 ########################################
191 # Layer 2 protocol: SRP
192 ########################################
193 libvnet_la_SOURCES += \
195 vnet/srp/interface.c \
199 nobase_include_HEADERS += \
203 ########################################
204 # Layer 2 protocol: PPP
205 ########################################
206 libvnet_la_SOURCES += \
211 nobase_include_HEADERS += \
216 ########################################
217 # Layer 2 protocol: HDLC
218 ########################################
219 libvnet_la_SOURCES += \
224 nobase_include_HEADERS += \
225 vnet/hdlc/error.def \
229 ########################################
230 # Layer 2 protocol: LLC
231 ########################################
232 libvnet_la_SOURCES += \
237 nobase_include_HEADERS += \
240 ########################################
241 # Layer 2 protocol: SNAP
242 ########################################
243 libvnet_la_SOURCES += \
248 nobase_include_HEADERS += \
251 ########################################
253 ########################################
254 libvnet_la_SOURCES += \
258 vnet/vxlan/vxlan_api.c
260 nobase_include_HEADERS += \
262 vnet/vxlan/vxlan_packet.h \
263 vnet/vxlan/vxlan_error.def \
264 vnet/vxlan/vxlan.api.h
266 libvnet_multiversioning_sources += \
269 API_FILES += vnet/vxlan/vxlan.api
271 ########################################
273 ########################################
274 libvnet_la_SOURCES += \
275 vnet/geneve/geneve.c \
276 vnet/geneve/encap.c \
277 vnet/geneve/decap.c \
278 vnet/geneve/geneve_api.c
280 nobase_include_HEADERS += \
281 vnet/geneve/geneve.h \
282 vnet/geneve/geneve_packet.h \
283 vnet/geneve/geneve_error.def \
284 vnet/geneve/geneve.api.h
286 API_FILES += vnet/geneve/geneve.api
288 ########################################
290 ########################################
291 libvnet_la_SOURCES += \
293 vnet/bonding/node.c \
294 vnet/bonding/device.c \
295 vnet/bonding/bond_api.c
297 nobase_include_HEADERS += \
298 vnet/bonding/node.h \
299 vnet/bonding/bond.api.h
301 libvnet_multiversioning_sources += \
304 API_FILES += vnet/bonding/bond.api
306 ########################################
308 ########################################
309 libvnet_la_SOURCES += \
310 vnet/lldp/lldp_input.c \
311 vnet/lldp/lldp_node.c \
312 vnet/lldp/lldp_output.c \
313 vnet/lldp/lldp_cli.c \
316 nobase_include_HEADERS += \
317 vnet/lldp/lldp_protocol.h \
321 API_FILES += vnet/lldp/lldp.api
323 ########################################
324 # Layer 2/3 "classify"
325 ########################################
326 libvnet_la_SOURCES += \
327 vnet/classify/vnet_classify.c \
328 vnet/classify/ip_classify.c \
329 vnet/classify/in_out_acl.c \
330 vnet/classify/policer_classify.c \
331 vnet/classify/flow_classify.c \
332 vnet/classify/flow_classify_node.c \
333 vnet/classify/vnet_classify.h \
334 vnet/classify/classify_api.c
336 nobase_include_HEADERS += \
337 vnet/classify/vnet_classify.h \
338 vnet/classify/in_out_acl.h \
339 vnet/classify/policer_classify.h \
340 vnet/classify/flow_classify.h \
341 vnet/classify/classify.api.h
343 API_FILES += vnet/classify/classify.api
345 ########################################
346 # Layer 3 protocols go here
347 ########################################
349 ########################################
350 # Layer 3 protocol: IP v4/v6
351 ########################################
352 libvnet_la_SOURCES += \
357 vnet/ip/ip_types_api.c \
358 vnet/ip/ip4_format.c \
359 vnet/ip/ip4_forward.c \
360 vnet/ip/ip4_punt_drop.c \
361 vnet/ip/ip4_input.c \
362 vnet/ip/ip4_options.c \
363 vnet/ip/ip4_mtrie.c \
365 vnet/ip/ip4_source_and_port_range_check.c \
366 vnet/ip/ip4_source_check.c \
367 vnet/ip/ip4_reassembly.c \
368 vnet/ip/ip6_format.c \
369 vnet/ip/ip6_forward.c \
370 vnet/ip/ip6_ll_table.c \
371 vnet/ip/ip6_ll_types.c \
372 vnet/ip/ip6_punt_drop.c \
373 vnet/ip/ip6_hop_by_hop.c \
374 vnet/ip/ip6_input.c \
375 vnet/ip/ip6_neighbor.c \
377 vnet/ip/ip6_reassembly.c \
379 vnet/ip/ip_neighbor.c \
381 vnet/ip/ip_checksum.c \
385 vnet/ip/ip_in_out_acl.c \
391 nobase_include_HEADERS += \
393 vnet/ip/icmp46_packet.h \
396 vnet/ip/igmp_packet.h \
398 vnet/ip/rd_cp.api.h \
399 vnet/ip/ip4_error.h \
401 vnet/ip/ip4_mtrie.h \
402 vnet/ip/ip4_packet.h \
403 vnet/ip/ip6_error.h \
405 vnet/ip/ip6_hop_by_hop.h \
406 vnet/ip/ip6_hop_by_hop_packet.h \
407 vnet/ip/ip6_packet.h \
408 vnet/ip/ip6_neighbor.h \
410 vnet/ip/ip_packet.h \
411 vnet/ip/ip_source_and_port_range_check.h \
412 vnet/ip/ip_neighbor.h \
415 vnet/ip/protocols.def \
416 vnet/ip/punt_error.def \
425 libvnet_multiversioning_sources += \
426 vnet/ip/ip4_forward.c \
429 ########################################
431 ########################################
432 libvnet_la_SOURCES += \
435 nobase_include_HEADERS += \
436 vnet/ethernet/arp_packet.h \
439 ########################################
440 # Bidirectional Forwarding Detection
441 ########################################
443 nobase_include_HEADERS += \
444 vnet/bfd/bfd_protocol.h \
445 vnet/bfd/bfd_main.h \
450 libvnet_la_SOURCES += \
453 vnet/bfd/bfd_main.c \
454 vnet/bfd/bfd_protocol.c \
458 API_FILES += vnet/bfd/bfd.api
460 ########################################
461 # Layer 3 protocol: IPSec
462 ########################################
464 libvnet_la_SOURCES += \
466 vnet/ipsec/ipsec_cli.c \
467 vnet/ipsec/ipsec_format.c \
468 vnet/ipsec/ipsec_input.c \
469 vnet/ipsec/ipsec_if.c \
470 vnet/ipsec/ipsec_if_in.c \
471 vnet/ipsec/esp_format.c \
472 vnet/ipsec/esp_encrypt.c \
473 vnet/ipsec/esp_decrypt.c \
474 vnet/ipsec/ah_decrypt.c \
475 vnet/ipsec/ah_encrypt.c \
477 vnet/ipsec/ikev2_crypto.c \
478 vnet/ipsec/ikev2_cli.c \
479 vnet/ipsec/ikev2_payload.c \
480 vnet/ipsec/ikev2_format.c \
481 vnet/ipsec/ipsec_api.c
483 API_FILES += vnet/ipsec/ipsec.api
486 libvnet_la_SOURCES += \
487 vnet/ipsec/ipsec_output.c
489 nobase_include_HEADERS += \
494 vnet/ipsec/ikev2_priv.h \
495 vnet/ipsec/ipsec.api.h
497 ########################################
498 # Layer 3 protocol: osi
499 ########################################
500 libvnet_la_SOURCES += \
505 nobase_include_HEADERS += \
508 ########################################
509 # Layer 4 protocol: tcp
510 ########################################
511 libvnet_la_SOURCES += \
513 vnet/tcp/tcp_format.c \
515 vnet/tcp/tcp_syn_filter4.c \
516 vnet/tcp/tcp_output.c \
517 vnet/tcp/tcp_input.c \
518 vnet/tcp/tcp_newreno.c \
521 nobase_include_HEADERS += \
522 vnet/tcp/tcp_packet.h \
523 vnet/tcp/tcp_timer.h \
524 vnet/tcp/tcp_debug.h \
526 vnet/tcp/tcp_error.def \
529 API_FILES += vnet/tcp/tcp.api
531 ########################################
532 # Layer 4 protocol: udp
533 ########################################
534 libvnet_la_SOURCES += \
536 vnet/udp/udp_input.c \
537 vnet/udp/udp_format.c \
538 vnet/udp/udp_local.c \
540 vnet/udp/udp_encap_node.c \
541 vnet/udp/udp_encap.c \
544 nobase_include_HEADERS += \
545 vnet/udp/udp_error.def \
547 vnet/udp/udp_packet.h \
550 API_FILES += vnet/udp/udp.api
552 ########################################
553 # Layer 4 protocol: sctp
554 ########################################
555 libvnet_la_SOURCES += \
556 vnet/sctp/sctp_api.c \
558 vnet/sctp/sctp_pg.c \
559 vnet/sctp/sctp_input.c \
560 vnet/sctp/sctp_output.c \
561 vnet/sctp/sctp_format.c
563 nobase_include_HEADERS += \
564 vnet/sctp/sctp_error.def \
565 vnet/sctp/sctp_packet.h \
566 vnet/sctp/sctp_timer.h \
570 API_FILES += vnet/sctp/sctp.api
572 ########################################
573 # Tunnel protocol: gre
574 ########################################
575 libvnet_la_SOURCES += \
578 vnet/gre/interface.c \
582 nobase_include_HEADERS += \
588 API_FILES += vnet/gre/gre.api
590 ########################################
591 # Tunnel protocol: ipip
592 ########################################
593 libvnet_la_SOURCES += \
597 vnet/ipip/ipip_api.c \
600 nobase_include_HEADERS += \
601 vnet/ipip/ipip.api.h \
604 API_FILES += vnet/ipip/ipip.api
606 ########################################
607 # Tunnel protocol: l2tpv3
608 ########################################
609 libvnet_la_SOURCES += \
616 nobase_include_HEADERS += \
621 API_FILES += vnet/l2tp/l2tp.api
623 ########################################
624 # Tunnel protocol: gre+mpls
625 ########################################
626 libvnet_la_SOURCES += \
628 vnet/mpls/mpls_lookup.c \
629 vnet/mpls/mpls_output.c \
630 vnet/mpls/mpls_features.c \
631 vnet/mpls/mpls_input.c \
632 vnet/mpls/interface.c \
633 vnet/mpls/mpls_tunnel.c \
637 nobase_include_HEADERS += \
639 vnet/mpls/mpls_types.h \
640 vnet/mpls/mpls_tunnel.h \
642 vnet/mpls/error.def \
645 API_FILES += vnet/mpls/mpls.api
647 ########################################
648 # Tunnel protocol: vxlan-gpe
649 ########################################
651 libvnet_la_SOURCES += \
652 vnet/vxlan-gpe/vxlan_gpe.c \
653 vnet/vxlan-gpe/encap.c \
654 vnet/vxlan-gpe/decap.c \
655 vnet/vxlan-gpe/vxlan_gpe_api.c
657 nobase_include_HEADERS += \
658 vnet/vxlan-gpe/vxlan_gpe.h \
659 vnet/vxlan-gpe/vxlan_gpe_packet.h \
660 vnet/vxlan-gpe/vxlan_gpe_error.def \
661 vnet/vxlan-gpe/vxlan_gpe.api.h
663 API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
665 ########################################
666 # Tunnel protocol: ipsec+gre
667 ########################################
668 libvnet_la_SOURCES += \
669 vnet/ipsec-gre/ipsec_gre.c \
670 vnet/ipsec-gre/node.c \
671 vnet/ipsec-gre/interface.c \
672 vnet/ipsec-gre/ipsec_gre_api.c
674 nobase_include_HEADERS += \
675 vnet/ipsec-gre/ipsec_gre.h \
676 vnet/ipsec-gre/error.def \
677 vnet/ipsec-gre/ipsec_gre.api.h
679 API_FILES += vnet/ipsec-gre/ipsec_gre.api
681 ########################################
682 # LISP control plane: lisp-cp
683 ########################################
685 libvnet_la_SOURCES += \
686 vnet/lisp-cp/lisp_types.c \
687 vnet/lisp-cp/lisp_cp_dpo.c \
688 vnet/lisp-cp/control.c \
689 vnet/lisp-cp/gid_dictionary.c \
690 vnet/lisp-cp/lisp_msg_serdes.c \
691 vnet/lisp-cp/packets.c \
692 vnet/lisp-cp/one_cli.c \
693 vnet/lisp-cp/lisp_cli.c \
694 vnet/lisp-cp/one_api.c \
695 vnet/lisp-cp/lisp_api.c
697 nobase_include_HEADERS += \
698 vnet/lisp-cp/lisp_types.h \
699 vnet/lisp-cp/packets.h \
700 vnet/lisp-cp/gid_dictionary.h \
701 vnet/lisp-cp/lisp_cp_messages.h \
702 vnet/lisp-cp/lisp_msg_serdes.h \
703 vnet/lisp-cp/control.h \
704 vnet/lisp-cp/one.api.h \
705 vnet/lisp-cp/lisp.api.h
707 API_FILES += vnet/lisp-cp/lisp.api
708 API_FILES += vnet/lisp-cp/one.api
718 -lpthread -ldl -lrt -lm
720 TESTS += test_cp_serdes test_lisp_types
722 test_cp_serdes_SOURCES = \
723 tests/vnet/lisp-cp/test_cp_serdes.c \
724 vnet/lisp-cp/lisp_msg_serdes.c \
725 vnet/lisp-cp/lisp_types.c \
726 vnet/lisp-cp/packets.c \
727 vnet/ip/ip_checksum.c
729 test_lisp_types_SOURCES = \
730 tests/vnet/lisp-cp/test_lisp_types.c \
731 vnet/lisp-cp/lisp_types.c
733 test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
734 test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
736 test_cp_serdes_LDADD = $(LDS)
737 test_lisp_types_LDADD = $(LDS)
740 ########################################
741 # Tunnel protocol: lisp-gpe
742 ########################################
744 libvnet_la_SOURCES += \
745 vnet/lisp-gpe/lisp_gpe.c \
746 vnet/lisp-gpe/lisp_gpe_sub_interface.c \
747 vnet/lisp-gpe/lisp_gpe_adjacency.c \
748 vnet/lisp-gpe/lisp_gpe_tunnel.c \
749 vnet/lisp-gpe/lisp_gpe_fwd_entry.c \
750 vnet/lisp-gpe/lisp_gpe_tenant.c \
751 vnet/lisp-gpe/interface.c \
752 vnet/lisp-gpe/decap.c \
753 vnet/lisp-gpe/lisp_gpe_api.c
755 nobase_include_HEADERS += \
756 vnet/lisp-gpe/lisp_gpe.h \
757 vnet/lisp-gpe/lisp_gpe_fwd_entry.h \
758 vnet/lisp-gpe/lisp_gpe_tenant.h \
759 vnet/lisp-gpe/lisp_gpe_packet.h \
760 vnet/lisp-gpe/lisp_gpe_error.def \
761 vnet/lisp-gpe/lisp_gpe.api.h
763 API_FILES += vnet/lisp-gpe/lisp_gpe.api
765 ########################################
767 ########################################
768 libvnet_la_SOURCES += \
770 vnet/dhcp/dhcp_client_detect.c \
771 vnet/dhcp/dhcp6_client_common_dp.c \
772 vnet/dhcp/dhcp6_pd_client_dp.c \
773 vnet/dhcp/dhcp6_pd_client_cp.c \
774 vnet/dhcp/dhcp6_ia_na_client_dp.c \
775 vnet/dhcp/dhcp6_ia_na_client_cp.c \
778 nobase_include_HEADERS += \
780 vnet/dhcp/dhcp6_client_common_dp.h \
781 vnet/dhcp/dhcp6_pd_client_dp.h \
782 vnet/dhcp/dhcp6_ia_na_client_dp.h \
783 vnet/dhcp/dhcp.api.h \
784 vnet/dhcp/dhcp6_pd_client_cp.api.h \
785 vnet/dhcp/dhcp6_ia_na_client_cp.api.h
789 vnet/dhcp/dhcp6_pd_client_cp.api \
790 vnet/dhcp/dhcp6_ia_na_client_cp.api
792 ########################################
794 ########################################
795 libvnet_la_SOURCES += \
796 vnet/dhcp/dhcp6_proxy_node.c \
797 vnet/dhcp/dhcp4_proxy_node.c \
798 vnet/dhcp/dhcp_proxy.c
800 nobase_include_HEADERS += \
801 vnet/dhcp/dhcp4_packet.h \
802 vnet/dhcp/dhcp6_packet.h \
803 vnet/dhcp/dhcp_proxy.h \
804 vnet/dhcp/dhcp6_proxy_error.def \
805 vnet/dhcp/dhcp4_proxy_error.def
807 ########################################
808 # ipv6 segment routing
809 ########################################
811 libvnet_la_SOURCES += \
813 vnet/srv6/sr_localsid.c \
814 vnet/srv6/sr_policy_rewrite.c \
815 vnet/srv6/sr_steering.c \
818 nobase_include_HEADERS += \
819 vnet/srv6/sr_packet.h \
823 API_FILES += vnet/srv6/sr.api
825 ########################################
826 # mpls segment routing
827 ########################################
829 libvnet_la_SOURCES += \
830 vnet/srmpls/sr_mpls_policy.c \
831 vnet/srmpls/sr_mpls_steering.c \
832 vnet/srmpls/sr_mpls_api.c
835 nobase_include_HEADERS += \
836 vnet/srmpls/sr_mpls.h \
837 vnet/srmpls/sr_mpls.api.h
839 API_FILES += vnet/srmpls/sr_mpls.api
841 ########################################
842 # IPFIX / netflow v10
843 ########################################
844 libvnet_la_SOURCES += \
845 vnet/ipfix-export/flow_report.c \
846 vnet/ipfix-export/flow_api.c
848 nobase_include_HEADERS += \
849 vnet/ipfix-export/flow_report.h \
850 vnet/ipfix-export/ipfix_info_elements.h \
851 vnet/ipfix-export/ipfix_packet.h \
852 vnet/ipfix-export/ipfix_export.api.h
854 API_FILES += vnet/ipfix-export/ipfix_export.api
856 ########################################
857 # IPFIX classify code
858 ########################################
860 libvnet_la_SOURCES += \
861 vnet/ipfix-export/flow_report_classify.c
863 nobase_include_HEADERS += \
864 vnet/ipfix-export/flow_report_classify.h
866 ########################################
868 ########################################
870 libvnet_la_SOURCES += \
871 vnet/lawful-intercept/lawful_intercept.c \
872 vnet/lawful-intercept/node.c
874 nobase_include_HEADERS += \
875 vnet/lawful-intercept/lawful_intercept.h
877 ########################################
878 # SPAN (port mirroring)
879 ########################################
881 libvnet_la_SOURCES += \
882 vnet/span/span_api.c \
886 nobase_include_HEADERS += \
887 vnet/span/span.api.h \
890 API_FILES += vnet/span/span.api
892 ########################################
894 ########################################
895 libvnet_la_SOURCES += \
898 vnet/dns/dns_packet.h \
899 vnet/dns/reply_node.c \
900 vnet/dns/request_node.c \
901 vnet/dns/resolver_process.c
903 nobase_include_HEADERS += \
907 API_FILES += vnet/dns/dns.api
909 ########################################
911 ########################################
913 libvnet_la_SOURCES += \
922 nobase_include_HEADERS += \
927 API_FILES += vnet/pg/pg.api
929 ########################################
931 ########################################
933 libvnet_la_SOURCES += \
934 vnet/devices/virtio/device.c \
935 vnet/devices/virtio/node.c \
936 vnet/devices/virtio/vhost_user.c \
937 vnet/devices/virtio/vhost_user_input.c \
938 vnet/devices/virtio/vhost_user_output.c \
939 vnet/devices/virtio/vhost_user_api.c \
940 vnet/devices/virtio/virtio.c
943 nobase_include_HEADERS += \
944 vnet/devices/virtio/virtio.h \
945 vnet/devices/virtio/vhost_user.h \
946 vnet/devices/virtio/vhost_user.api.h
948 libvnet_multiversioning_sources += \
949 vnet/devices/virtio/vhost_user_input.c \
950 vnet/devices/virtio/vhost_user_output.c
952 API_FILES += vnet/devices/virtio/vhost_user.api
954 ########################################
955 # tap interface (with virtio backend)
956 ########################################
958 libvnet_la_SOURCES += \
959 vnet/devices/tap/cli.c \
960 vnet/devices/tap/tap.c \
961 vnet/devices/tap/tapv2_api.c
963 nobase_include_HEADERS += \
964 vnet/devices/tap/tap.h \
965 vnet/devices/tap/tapv2.api.h
967 API_FILES += vnet/devices/tap/tapv2.api
969 ########################################
970 # tap interface (with virtio backend)
971 ########################################
973 libvnet_la_SOURCES += \
974 vnet/devices/pipe/pipe_api.c \
975 vnet/devices/pipe/pipe.c
977 nobase_include_HEADERS += \
978 vnet/devices/pipe/pipe.h \
979 vnet/devices/pipe/pipe.api.h
981 API_FILES += vnet/devices/pipe/pipe.api
983 ########################################
985 ########################################
987 libvnet_la_SOURCES += \
988 vnet/session/session.c \
989 vnet/session/session_table.c \
990 vnet/session/session_rules_table.c \
991 vnet/session/session_lookup.c \
992 vnet/session/session_node.c \
993 vnet/session/transport.c \
994 vnet/session/application.c \
995 vnet/session/session_cli.c \
996 vnet/session/application_interface.c \
997 vnet/session/application_namespace.c \
998 vnet/session/segment_manager.c \
999 vnet/session/session_test.c \
1000 vnet/session/session_api.c
1002 nobase_include_HEADERS += \
1003 vnet/session/session.h \
1004 vnet/session/session_table.h \
1005 vnet/session/session_rules_table.h \
1006 vnet/session/stream_session.h \
1007 vnet/session/session_lookup.h \
1008 vnet/session/application.h \
1009 vnet/session/transport.h \
1010 vnet/session/transport_interface.h \
1011 vnet/session/application_interface.h \
1012 vnet/session/application_namespace.h \
1013 vnet/session/session_debug.h \
1014 vnet/session/segment_manager.h \
1015 vnet/session/mma_template.h \
1016 vnet/session/mma_template.c \
1017 vnet/session/mma_16.h \
1018 vnet/session/mma_40.h \
1019 vnet/session/session.api.h
1021 API_FILES += vnet/session/session.api
1023 ########################################
1024 # session layer applications
1025 ########################################
1027 libvnet_la_SOURCES += \
1028 vnet/session-apps/echo_client.c \
1029 vnet/session-apps/echo_server.c \
1030 vnet/session-apps/http_server.c \
1031 vnet/session-apps/proxy.c
1033 nobase_include_HEADERS += \
1034 vnet/session-apps/echo_client.h \
1035 vnet/session-apps/proxy.h
1037 ########################################
1039 ########################################
1041 libvnet_la_SOURCES += vnet/tls/tls.c
1043 nobase_include_HEADERS += \
1046 ########################################
1047 # Linux packet interface
1048 ########################################
1050 libvnet_la_SOURCES += \
1051 vnet/devices/af_packet/af_packet.c \
1052 vnet/devices/af_packet/device.c \
1053 vnet/devices/af_packet/node.c \
1054 vnet/devices/af_packet/cli.c \
1055 vnet/devices/af_packet/af_packet_api.c
1057 nobase_include_HEADERS += \
1058 vnet/devices/af_packet/af_packet.h \
1059 vnet/devices/af_packet/af_packet.api.h
1061 API_FILES += vnet/devices/af_packet/af_packet.api
1063 ########################################
1065 ########################################
1067 libvnet_la_SOURCES += \
1068 vnet/devices/netmap/netmap.c \
1069 vnet/devices/netmap/device.c \
1070 vnet/devices/netmap/node.c \
1071 vnet/devices/netmap/cli.c \
1072 vnet/devices/netmap/netmap_api.c
1074 nobase_include_HEADERS += \
1075 vnet/devices/netmap/netmap.h \
1076 vnet/devices/netmap/netmap.api.h
1078 API_FILES += vnet/devices/netmap/netmap.api
1080 ########################################
1081 # Driver feature graph arc support
1082 ########################################
1084 libvnet_la_SOURCES += \
1085 vnet/feature/feature.c \
1086 vnet/feature/feature_api.c \
1087 vnet/feature/registration.c
1089 nobase_include_HEADERS += \
1090 vnet/feature/feature.h \
1091 vnet/feature/feature.api.h
1093 API_FILES += vnet/feature/feature.api
1095 ########################################
1096 # Unix kernel related
1097 ########################################
1099 # FIXME: vnet/unix/hgshm.c
1101 libvnet_la_SOURCES += \
1102 vnet/unix/gdb_funcs.c \
1104 vnet/unix/tap_api.c \
1105 vnet/unix/tapcli.c \
1108 nobase_include_HEADERS += \
1110 vnet/unix/tuntap.h \
1111 vnet/unix/tap.api.h \
1114 API_FILES += vnet/unix/tap.api
1116 ########################################
1118 ########################################
1120 libvnet_la_SOURCES += \
1122 vnet/fib/fib_test.c \
1123 vnet/fib/ip4_fib.c \
1124 vnet/fib/ip6_fib.c \
1125 vnet/fib/mpls_fib.c \
1126 vnet/fib/fib_table.c \
1127 vnet/fib/fib_walk.c \
1128 vnet/fib/fib_types.c \
1129 vnet/fib/fib_node.c \
1130 vnet/fib/fib_node_list.c \
1131 vnet/fib/fib_entry.c \
1132 vnet/fib/fib_entry_src.c \
1133 vnet/fib/fib_entry_src_rr.c \
1134 vnet/fib/fib_entry_src_interface.c \
1135 vnet/fib/fib_entry_src_interpose.c \
1136 vnet/fib/fib_entry_src_default_route.c \
1137 vnet/fib/fib_entry_src_special.c \
1138 vnet/fib/fib_entry_src_api.c \
1139 vnet/fib/fib_entry_src_adj.c \
1140 vnet/fib/fib_entry_src_mpls.c \
1141 vnet/fib/fib_entry_src_lisp.c \
1142 vnet/fib/fib_entry_cover.c \
1143 vnet/fib/fib_entry_delegate.c \
1144 vnet/fib/fib_path_list.c \
1145 vnet/fib/fib_path.c \
1146 vnet/fib/fib_path_ext.c \
1147 vnet/fib/fib_urpf_list.c \
1148 vnet/fib/fib_attached_export.c \
1149 vnet/fib/fib_api.c \
1152 nobase_include_HEADERS += \
1154 vnet/fib/fib_api.h \
1155 vnet/fib/ip4_fib.h \
1156 vnet/fib/ip6_fib.h \
1157 vnet/fib/fib_types.h \
1158 vnet/fib/fib_table.h \
1159 vnet/fib/fib_node.h \
1160 vnet/fib/fib_node_list.h \
1161 vnet/fib/fib_entry.h \
1162 vnet/fib/fib_entry_delegate.h
1164 ########################################
1166 ########################################
1168 libvnet_la_SOURCES += \
1169 vnet/adj/adj_nbr.c \
1170 vnet/adj/adj_glean.c \
1171 vnet/adj/adj_midchain.c \
1172 vnet/adj/adj_mcast.c \
1174 vnet/adj/adj_nsh.c \
1176 vnet/adj/rewrite.c \
1177 vnet/adj/adj_bfd.c \
1178 vnet/adj/adj_delegate.c
1180 nobase_include_HEADERS += \
1182 vnet/adj/adj_types.h \
1183 vnet/adj/adj_glean.h \
1184 vnet/adj/adj_nsh.h \
1185 vnet/adj/adj_nbr.h \
1188 ########################################
1189 # Data-Plane Objects
1190 ########################################
1192 libvnet_la_SOURCES += \
1194 vnet/dpo/drop_dpo.c \
1195 vnet/dpo/ip_null_dpo.c \
1196 vnet/dpo/ip6_ll_dpo.c \
1197 vnet/dpo/punt_dpo.c \
1198 vnet/dpo/receive_dpo.c \
1199 vnet/dpo/load_balance.c \
1200 vnet/dpo/load_balance_map.c \
1201 vnet/dpo/lookup_dpo.c \
1202 vnet/dpo/classify_dpo.c \
1203 vnet/dpo/replicate_dpo.c \
1204 vnet/dpo/interface_rx_dpo.c \
1205 vnet/dpo/interface_tx_dpo.c \
1206 vnet/dpo/mpls_disposition.c \
1207 vnet/dpo/mpls_label_dpo.c \
1208 vnet/dpo/l3_proxy_dpo.c \
1211 nobase_include_HEADERS += \
1212 vnet/dpo/load_balance.h \
1213 vnet/dpo/drop_dpo.h \
1214 vnet/dpo/lookup_dpo.h \
1215 vnet/dpo/punt_dpo.h \
1216 vnet/dpo/classify_dpo.h \
1217 vnet/dpo/receive_dpo.h \
1218 vnet/dpo/ip_null_dpo.h \
1219 vnet/dpo/replicate_dpo.h \
1222 ########################################
1224 ########################################
1226 libvnet_la_SOURCES += \
1227 vnet/mfib/mfib_test.c \
1228 vnet/mfib/mfib_forward.c \
1229 vnet/mfib/ip4_mfib.c \
1230 vnet/mfib/ip6_mfib.c \
1231 vnet/mfib/mfib_types.c \
1232 vnet/mfib/mfib_signal.c \
1233 vnet/mfib/mfib_itf.c \
1234 vnet/mfib/mfib_entry.c \
1235 vnet/mfib/mfib_table.c
1237 nobase_include_HEADERS += \
1238 vnet/mfib/ip4_mfib.h \
1239 vnet/mfib/mfib_types.h \
1240 vnet/mfib/mfib_table.h
1242 ########################################
1244 ########################################
1246 libvnet_la_SOURCES += \
1248 vnet/util/refcount.c \
1249 vnet/util/throttle.c \
1250 vnet/util/trajectory.c
1252 nobase_include_HEADERS += \
1253 vnet/util/throttle.h
1255 ########################################
1257 ########################################
1259 libvnet_la_SOURCES += \
1260 vnet/qos/qos_types.c \
1261 vnet/qos/qos_api.c \
1262 vnet/qos/qos_egress_map.c \
1263 vnet/qos/qos_record.c \
1266 API_FILES += vnet/qos/qos.api
1268 nobase_include_HEADERS += \
1271 ########################################
1273 ########################################
1275 libvnet_la_SOURCES += \
1276 vnet/bier/bier_bit_string.c \
1277 vnet/bier/bier_entry.c \
1278 vnet/bier/bier_fmask.c \
1279 vnet/bier/bier_fmask_db.c \
1280 vnet/bier/bier_input.c \
1281 vnet/bier/bier_lookup.c \
1282 vnet/bier/bier_output.c \
1283 vnet/bier/bier_table.c \
1284 vnet/bier/bier_types.c \
1285 vnet/bier/bier_test.c \
1286 vnet/bier/bier_api.c \
1287 vnet/bier/bier_drop.c \
1288 vnet/bier/bier_update.c \
1289 vnet/bier/bier_imp_node.c \
1290 vnet/bier/bier_imp.c \
1291 vnet/bier/bier_disp_entry.c \
1292 vnet/bier/bier_disp_lookup_node.c \
1293 vnet/bier/bier_disp_dispatch_node.c \
1294 vnet/bier/bier_disp_table.c \
1295 vnet/bier/bier_bift_table.c
1297 nobase_include_HEADERS += \
1298 vnet/bier/bier_types.h \
1299 vnet/bier/bier_entry.h \
1300 vnet/bier/bier_update.h \
1301 vnet/bier/bier.api.h \
1302 vnet/bier/bier_table.h
1304 API_FILES += vnet/bier/bier.api
1308 ###############################################################
1310 ###############################################################
1311 libvnet_avx2_la_SOURCES = $(libvnet_multiversioning_sources)
1312 libvnet_avx2_la_CFLAGS = \
1313 $(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
1314 -DCLIB_MARCH_VARIANT=avx2
1315 noinst_LTLIBRARIES += libvnet_avx2.la
1316 libvnet_la_LIBADD += libvnet_avx2.la
1319 if CC_SUPPORTS_AVX512
1320 ###############################################################
1322 ###############################################################
1323 libvnet_avx512_la_SOURCES = $(libvnet_multiversioning_sources)
1324 libvnet_avx512_la_CFLAGS = \
1325 $(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
1326 -DCLIB_MARCH_VARIANT=avx512
1327 noinst_LTLIBRARIES += libvnet_avx512.la
1328 libvnet_la_LIBADD += libvnet_avx512.la
1332 ########################################
1334 ########################################
1336 noinst_PROGRAMS += tcp_echo udp_echo
1338 TEST_APPS_LDADD = libvlibmemoryclient.la libsvm.la libvppinfra.la
1339 TEST_APPS_LDADD += -lpthread -lm -lrt
1341 tcp_echo_SOURCES = tests/vnet/session/tcp_echo.c
1342 tcp_echo_LDADD = $(TEST_APPS_LDADD)
1344 udp_echo_SOURCES = tests/vnet/session/udp_echo.c
1345 udp_echo_LDADD = $(TEST_APPS_LDADD)
1347 ########################################
1348 # Plugin client library
1349 ########################################
1351 nobase_include_HEADERS += \
1352 vnet/plugin/plugin.h
1355 vnet/unix/pcap2pg.c \
1358 pcap2pg_LDFLAGS = -static
1359 pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1361 pcap2cinit_SOURCES = \
1362 vnet/unix/pcap2cinit.c \
1365 pcap2cinit_LDFLAGS = -static
1366 pcap2cinit_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1368 noinst_PROGRAMS += pcap2pg pcap2cinit
1370 # vi:syntax=automake