1 # Copyright (c) 2018-2020 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.
17 unset(VNET_MULTIARCH_SOURCES)
19 ##############################################################################
21 ##############################################################################
22 list(APPEND VNET_SOURCES
43 list(APPEND VNET_MULTIARCH_SOURCES
49 list(APPEND VNET_HEADERS
58 interface/rx_queue_funcs.h
59 interface/tx_queue_funcs.h
74 ethernet/ethernet_format_fns.h
77 list(APPEND VNET_API_FILES
85 ##############################################################################
87 ##############################################################################
88 list(APPEND VNET_SOURCES
95 list(APPEND VNET_MULTIARCH_SOURCES
99 list(APPEND VNET_HEADERS
105 list(APPEND VNET_API_FILES
107 policer/policer_types.api
110 ##############################################################################
111 # Layer 2 protocols go here
112 ##############################################################################
114 ##############################################################################
115 # Layer 2 protocol: Ethernet
116 ##############################################################################
117 list(APPEND VNET_SOURCES
118 ethernet/arp_packet.c
119 ethernet/ethernet_types_api.c
123 ethernet/mac_address.c
127 ethernet/p2p_ethernet.c
128 ethernet/p2p_ethernet_input.c
129 ethernet/p2p_ethernet_api.c
132 list(APPEND VNET_MULTIARCH_SOURCES
134 ethernet/p2p_ethernet_input.c
137 list(APPEND VNET_HEADERS
140 ethernet/mac_address.h
144 ethernet/p2p_ethernet.h
145 ethernet/arp_packet.h
148 list(APPEND VNET_API_FILES
149 ethernet/p2p_ethernet.api
150 ethernet/ethernet_types.api)
152 ##############################################################################
153 # Layer 2 protocol: Ethernet bridging
154 ##############################################################################
155 list(APPEND VNET_SOURCES
162 l2/l2_input_classify.c
163 l2/l2_output_classify.c
174 l2/l2_in_out_feat_arc.c
182 list(APPEND VNET_MULTIARCH_SOURCES
188 l2/l2_in_out_feat_arc.c
189 l2/l2_input_classify.c
191 l2/l2_output_classify.c
201 list(APPEND VNET_HEADERS
218 list(APPEND VNET_API_FILES l2/l2.api)
220 ##############################################################################
221 # Layer 2 protocol: SRP
222 ##############################################################################
223 list(APPEND VNET_SOURCES
230 list(APPEND VNET_HEADERS
235 ##############################################################################
236 # Layer 2 protocol: PPP
237 ##############################################################################
238 list(APPEND VNET_SOURCES
244 list(APPEND VNET_HEADERS
250 ##############################################################################
251 # Layer 2 protocol: HDLC
252 ##############################################################################
253 list(APPEND VNET_SOURCES
259 list(APPEND VNET_HEADERS
265 ##############################################################################
266 # Layer 2 protocol: LLC
267 ##############################################################################
268 list(APPEND VNET_SOURCES
274 list(APPEND VNET_HEADERS
278 ##############################################################################
279 # Layer 2 protocol: SNAP
280 ##############################################################################
281 list(APPEND VNET_SOURCES
287 list(APPEND VNET_HEADERS
291 ##############################################################################
293 ##############################################################################
294 list(APPEND VNET_SOURCES
301 list(APPEND VNET_MULTIARCH_SOURCES
305 list(APPEND VNET_HEADERS
308 vxlan/vxlan_error.def
311 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
313 list(APPEND VNET_API_FILES vxlan/vxlan.api)
315 ##############################################################################
317 ##############################################################################
318 list(APPEND VNET_SOURCES
325 list(APPEND VNET_HEADERS
329 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
330 list(APPEND VNET_API_FILES bonding/bond.api)
332 ##############################################################################
333 # Layer 2/3 "classify"
334 ##############################################################################
335 list(APPEND VNET_SOURCES
336 classify/vnet_classify.c
337 classify/trace_classify.h
338 classify/ip_classify.c
339 classify/in_out_acl.c
340 classify/policer_classify.c
341 classify/flow_classify.c
342 classify/flow_classify_node.c
343 classify/vnet_classify.h
344 classify/classify_api.c
347 list(APPEND VNET_MULTIARCH_SOURCES
348 classify/ip_classify.c
349 classify/flow_classify_node.c
352 list(APPEND VNET_HEADERS
353 classify/vnet_classify.h
354 classify/trace_classify.h
355 classify/in_out_acl.h
356 classify/policer_classify.h
357 classify/flow_classify.h
360 list(APPEND VNET_API_FILES classify/classify.api)
362 ##############################################################################
363 # Layer 3 protocols go here
364 ##############################################################################
366 ##############################################################################
367 # Layer 3 protocol: IP v4/v6
368 ##############################################################################
369 list(APPEND VNET_SOURCES
383 ip/ip4_source_and_port_range_check.c
384 ip/reass/ip4_full_reass.c
385 ip/reass/ip4_sv_reass.c
395 ip/reass/ip6_full_reass.c
396 ip/reass/ip6_sv_reass.c
399 ip/ip_container_proxy.c
406 ip/ip_path_mtu_node.c
416 list(APPEND VNET_MULTIARCH_SOURCES
418 ip/reass/ip4_full_reass.c
420 ip/reass/ip6_full_reass.c
421 ip/reass/ip4_sv_reass.c
423 ip/reass/ip6_full_reass.c
424 ip/reass/ip6_sv_reass.c
429 ip/ip_path_mtu_node.c
432 list(APPEND VNET_HEADERS
447 ip/ip6_hop_by_hop_packet.h
451 ip/ip_container_proxy.h
456 ip/ip_source_and_port_range_check.h
465 list(APPEND VNET_API_FILES
470 list(APPEND VNET_MULTIARCH_SOURCES
476 ##############################################################################
478 ##############################################################################
479 list(APPEND VNET_SOURCES
480 ip-neighbor/ip_neighbor.c
481 ip-neighbor/ip_neighbor_api.c
482 ip-neighbor/ip_neighbor_dp.c
483 ip-neighbor/ip_neighbor_types.c
484 ip-neighbor/ip_neighbor_watch.c
485 ip-neighbor/ip4_neighbor.c
486 ip-neighbor/ip6_neighbor.c
489 list(APPEND VNET_HEADERS
490 ip-neighbor/ip_neighbor.h
491 ip-neighbor/ip_neighbor_types.h
494 list(APPEND VNET_API_FILES
495 ip-neighbor/ip_neighbor.api
498 ##############################################################################
499 # Bidirectional Forwarding Detection
500 ##############################################################################
502 list(APPEND VNET_HEADERS
509 list(APPEND VNET_SOURCES
518 list(APPEND VNET_API_FILES bfd/bfd.api)
520 ##############################################################################
522 ##############################################################################
524 list(APPEND VNET_SOURCES
532 list(APPEND VNET_HEADERS
536 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
538 list(APPEND VNET_API_FILES crypto/crypto.api)
540 ##############################################################################
541 # Layer 3 protocol: IPSec
542 ##############################################################################
543 list(APPEND VNET_SOURCES
547 ipsec/ipsec_handoff.c
553 ipsec/ipsec_spd_policy.c
562 ipsec/ipsec_types_api.c
565 list(APPEND VNET_MULTIARCH_SOURCES
570 ipsec/ipsec_handoff.c
576 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
577 list(APPEND VNET_API_FILES ipsec/ipsec.api)
579 list(APPEND VNET_SOURCES
583 list(APPEND VNET_HEADERS
586 ipsec/ipsec_spd_policy.h
589 ipsec/ipsec_types_api.h
595 ##############################################################################
596 # Layer 3 protocol: osi
597 ##############################################################################
598 list(APPEND VNET_SOURCES
604 list(APPEND VNET_HEADERS
608 ##############################################################################
609 # Layer 4 protocol: tcp
610 ##############################################################################
611 list(APPEND VNET_SOURCES
615 tcp/tcp_syn_filter4.c
628 list(APPEND VNET_MULTIARCH_SOURCES
631 tcp/tcp_syn_filter4.c
634 list(APPEND VNET_HEADERS
647 list(APPEND VNET_API_FILES tcp/tcp.api)
649 ##############################################################################
650 # Layer 4 protocol: udp
651 ##############################################################################
652 list(APPEND VNET_SOURCES
665 list(APPEND VNET_MULTIARCH_SOURCES
670 list(APPEND VNET_HEADERS
678 list(APPEND VNET_API_FILES udp/udp.api)
680 ##############################################################################
681 # Tunnel protocol: gre
682 ##############################################################################
683 list(APPEND VNET_SOURCES
691 list(APPEND VNET_MULTIARCH_SOURCES
696 list(APPEND VNET_HEADERS
702 list(APPEND VNET_API_FILES gre/gre.api)
704 ##############################################################################
705 # Tunnel protocol: ipip
706 ##############################################################################
707 list(APPEND VNET_SOURCES
715 list(APPEND VNET_MULTIARCH_SOURCES
719 list(APPEND VNET_HEADERS
723 list(APPEND VNET_API_FILES
727 ##############################################################################
729 ##############################################################################
730 list(APPEND VNET_SOURCES
732 tunnel/tunnel_types_api.c
735 list(APPEND VNET_API_FILES
736 tunnel/tunnel_types.api
739 list(APPEND VNET_HEADERS
744 ##############################################################################
745 # Tunnel protocol: gre+mpls
746 ##############################################################################
747 list(APPEND VNET_SOURCES
759 list(APPEND VNET_MULTIARCH_SOURCES
766 list(APPEND VNET_HEADERS
774 list(APPEND VNET_API_FILES mpls/mpls.api)
776 ##############################################################################
777 # Tunnel protocol: vxlan-gbp
778 ##############################################################################
779 list(APPEND VNET_SOURCES
782 vxlan-gbp/vxlan_gbp_api.c
783 vxlan-gbp/vxlan_gbp.c
784 vxlan-gbp/vxlan_gbp_packet.c
787 list (APPEND VNET_MULTIARCH_SOURCES
792 list(APPEND VNET_HEADERS
793 vxlan-gbp/vxlan_gbp.h
794 vxlan-gbp/vxlan_gbp_packet.h
795 vxlan-gbp/vxlan_gbp_error.def
798 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
800 ##############################################################################
801 # Tunnel protocol: vxlan-gpe
802 ##############################################################################
804 list(APPEND VNET_SOURCES
805 vxlan-gpe/vxlan_gpe.c
808 vxlan-gpe/vxlan_gpe_api.c
811 list (APPEND VNET_MULTIARCH_SOURCES
815 list(APPEND VNET_HEADERS
816 vxlan-gpe/vxlan_gpe.h
817 vxlan-gpe/vxlan_gpe_packet.h
818 vxlan-gpe/vxlan_gpe_error.def
821 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
823 ##############################################################################
824 # ipv6 segment routing
825 ##############################################################################
827 list(APPEND VNET_SOURCES
830 srv6/sr_policy_rewrite.c
835 list(APPEND VNET_HEADERS
840 list(APPEND VNET_API_FILES
845 ##############################################################################
846 # mpls segment routing
847 ##############################################################################
849 list(APPEND VNET_SOURCES
850 srmpls/sr_mpls_policy.c
851 srmpls/sr_mpls_steering.c
855 list(APPEND VNET_HEADERS
859 list(APPEND VNET_API_FILES
863 ##############################################################################
864 # IPFIX / netflow v10
865 ##############################################################################
866 list(APPEND VNET_SOURCES
867 ipfix-export/flow_report.c
868 ipfix-export/flow_api.c
871 list(APPEND VNET_HEADERS
872 ipfix-export/flow_report.h
873 ipfix-export/ipfix_info_elements.h
874 ipfix-export/ipfix_packet.h
877 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
879 ##############################################################################
881 ##############################################################################
882 list(APPEND VNET_SOURCES
889 list(APPEND VNET_HEADERS
892 gso/hdr_offset_parser.h
896 list(APPEND VNET_API_FILES
900 ##############################################################################
901 # IPFIX classify code
902 ##############################################################################
904 list(APPEND VNET_SOURCES
905 ipfix-export/flow_report_classify.c
908 list(APPEND VNET_HEADERS
909 ipfix-export/flow_report_classify.h
912 ##############################################################################
914 ##############################################################################
916 list(APPEND VNET_SOURCES
917 lawful-intercept/lawful_intercept.c
918 lawful-intercept/node.c
921 list(APPEND VNET_MULTIARCH_SOURCES
922 lawful-intercept/node.c
925 list(APPEND VNET_HEADERS
926 lawful-intercept/lawful_intercept.h
929 ##############################################################################
930 # SPAN (port mirroring)
931 ##############################################################################
933 list(APPEND VNET_SOURCES
939 list(APPEND VNET_MULTIARCH_SOURCES
943 list(APPEND VNET_HEADERS
947 list(APPEND VNET_API_FILES span/span.api)
949 ##############################################################################
951 ##############################################################################
953 list(APPEND VNET_SOURCES
963 list(APPEND VNET_HEADERS
968 list(APPEND VNET_API_FILES pg/pg.api)
970 ##############################################################################
972 ##############################################################################
974 list(APPEND VNET_SOURCES
976 devices/virtio/device.c
977 devices/virtio/format.c
978 devices/virtio/node.c
980 devices/virtio/vhost_user.c
981 devices/virtio/vhost_user_input.c
982 devices/virtio/vhost_user_output.c
983 devices/virtio/vhost_user_api.c
984 devices/virtio/virtio.c
985 devices/virtio/virtio_api.c
986 devices/virtio/virtio_pci_legacy.c
987 devices/virtio/virtio_pci_modern.c
988 devices/virtio/virtio_process.c
989 devices/virtio/virtio_types_api.c
992 list(APPEND VNET_HEADERS
994 devices/virtio/virtio.h
995 devices/virtio/virtio_buffering.h
996 devices/virtio/virtio_std.h
997 devices/virtio/virtio_pci_legacy.h
998 devices/virtio/virtio_pci_modern.h
999 devices/virtio/vhost_std.h
1000 devices/virtio/vhost_user.h
1001 devices/virtio/virtio_types_api.h
1004 list(APPEND VNET_MULTIARCH_SOURCES
1005 devices/virtio/vhost_user_input.c
1006 devices/virtio/vhost_user_output.c
1007 devices/virtio/node.c
1008 devices/af_packet/node.c
1009 devices/virtio/device.c
1012 list(APPEND VNET_API_FILES
1013 devices/virtio/vhost_user.api
1014 devices/virtio/virtio.api
1015 devices/virtio/virtio_types.api
1018 ##############################################################################
1019 # tap interface (with virtio backend)
1020 ##############################################################################
1022 list(APPEND VNET_SOURCES
1025 devices/tap/tapv2_api.c
1028 list(APPEND VNET_HEADERS
1032 list(APPEND VNET_API_FILES
1033 devices/tap/tapv2.api
1036 ##############################################################################
1037 # tap interface (with virtio backend)
1038 ##############################################################################
1040 list(APPEND VNET_SOURCES
1041 devices/pipe/pipe_api.c
1045 list(APPEND VNET_HEADERS
1049 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1051 ##############################################################################
1052 # session managmeent
1053 ##############################################################################
1055 list(APPEND VNET_SOURCES
1057 session/session_debug.c
1058 session/session_table.c
1059 session/session_rules_table.c
1060 session/session_lookup.c
1061 session/session_node.c
1063 session/application.c
1064 session/application_worker.c
1065 session/session_cli.c
1066 session/application_interface.c
1067 session/application_local.c
1068 session/application_namespace.c
1069 session/segment_manager.c
1070 session/session_api.c
1073 list(APPEND VNET_HEADERS
1075 session/session_table.h
1076 session/session_rules_table.h
1077 session/session_types.h
1078 session/session_lookup.h
1079 session/application.h
1081 session/transport_types.h
1082 session/application_interface.h
1083 session/application_local.h
1084 session/application_namespace.h
1085 session/session_debug.h
1086 session/segment_manager.h
1087 session/mma_template.h
1088 session/mma_template.c
1093 list(APPEND VNET_API_FILES session/session.api)
1095 ##############################################################################
1097 ##############################################################################
1099 list(APPEND VNET_SOURCES
1103 list(APPEND VNET_HEADERS
1108 ##############################################################################
1109 # Linux packet interface
1110 ##############################################################################
1112 list(APPEND VNET_SOURCES
1113 devices/af_packet/af_packet.c
1114 devices/af_packet/device.c
1115 devices/af_packet/node.c
1116 devices/af_packet/cli.c
1117 devices/af_packet/af_packet_api.c
1120 list(APPEND VNET_MULTIARCH_SOURCES
1121 devices/af_packet/device.c
1124 list(APPEND VNET_HEADERS
1125 devices/af_packet/af_packet.h
1128 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1130 ##############################################################################
1131 # Driver feature graph arc support
1132 ##############################################################################
1134 list(APPEND VNET_SOURCES
1136 feature/feature_api.c
1137 feature/registration.c
1140 list(APPEND VNET_HEADERS
1144 list(APPEND VNET_API_FILES feature/feature.api)
1146 ##############################################################################
1147 # Unix kernel related
1148 ##############################################################################
1150 # FIXME: unix/hgshm.c
1152 list(APPEND VNET_SOURCES
1157 list(APPEND VNET_HEADERS
1161 ##############################################################################
1163 ##############################################################################
1165 list(APPEND VNET_SOURCES
1177 fib/fib_entry_src_adj.c
1178 fib/fib_entry_src_api.c
1179 fib/fib_entry_src_drop.c
1180 fib/fib_entry_src_interface.c
1181 fib/fib_entry_src_interpose.c
1182 fib/fib_entry_src_lisp.c
1183 fib/fib_entry_src_mpls.c
1184 fib/fib_entry_src_simple.c
1185 fib/fib_entry_src_rr.c
1186 fib/fib_entry_cover.c
1187 fib/fib_entry_delegate.c
1188 fib/fib_entry_track.c
1195 fib/fib_attached_export.c
1200 list(APPEND VNET_HEADERS
1210 fib/fib_entry_delegate.h
1215 list(APPEND VNET_API_FILES
1220 ##############################################################################
1222 ##############################################################################
1224 list(APPEND VNET_SOURCES
1228 adj/adj_midchain_node.c
1229 adj/adj_midchain_delegate.c
1239 list(APPEND VNET_MULTIARCH_SOURCES
1242 adj/adj_midchain_node.c
1245 list(APPEND VNET_HEADERS
1255 ##############################################################################
1256 # Data-Plane Objects
1257 ##############################################################################
1259 list(APPEND VNET_SOURCES
1267 dpo/load_balance_map.c
1271 dpo/interface_rx_dpo.c
1272 dpo/interface_tx_dpo.c
1273 dpo/mpls_disposition.c
1274 dpo/mpls_label_dpo.c
1280 list(APPEND VNET_MULTIARCH_SOURCES
1282 dpo/mpls_disposition.c
1284 dpo/mpls_label_dpo.c
1285 dpo/interface_rx_dpo.c
1288 list(APPEND VNET_HEADERS
1300 ##############################################################################
1302 ##############################################################################
1304 list(APPEND VNET_SOURCES
1314 mfib/mfib_entry_cover.c
1315 mfib/mfib_entry_delegate.c
1316 mfib/mfib_entry_src.c
1317 mfib/mfib_entry_src_rr.c
1321 list(APPEND VNET_MULTIARCH_SOURCES
1325 list(APPEND VNET_HEADERS
1331 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1333 ##############################################################################
1335 ##############################################################################
1337 list(APPEND VNET_SOURCES
1343 list(APPEND VNET_HEADERS
1347 ##############################################################################
1349 ##############################################################################
1351 list(APPEND VNET_SOURCES
1354 qos/qos_egress_map.c
1356 qos/qos_record_node.c
1358 qos/qos_store_node.c
1363 list(APPEND VNET_MULTIARCH_SOURCES
1364 qos/qos_record_node.c
1368 list(APPEND VNET_API_FILES qos/qos.api)
1370 ##############################################################################
1372 ##############################################################################
1374 list(APPEND VNET_SOURCES
1375 bier/bier_bit_string.c
1378 bier/bier_fmask_db.c
1387 bier/bier_imp_node.c
1389 bier/bier_disp_entry.c
1390 bier/bier_disp_lookup_node.c
1391 bier/bier_disp_dispatch_node.c
1392 bier/bier_disp_table.c
1393 bier/bier_bift_table.c
1396 list(APPEND VNET_MULTIARCH_SOURCES
1397 bier/bier_disp_dispatch_node.c
1398 bier/bier_disp_lookup_node.c
1399 bier/bier_imp_node.c
1402 list(APPEND VNET_HEADERS
1409 list(APPEND VNET_API_FILES bier/bier.api)
1411 ##############################################################################
1413 ##############################################################################
1415 list (APPEND VNET_SOURCES
1421 list(APPEND VNET_HEADERS
1426 list(APPEND VNET_API_FILES syslog/syslog.api)
1428 ##############################################################################
1429 # Tunnel Endpoint Information Base
1430 ##############################################################################
1432 list (APPEND VNET_SOURCES
1438 list(APPEND VNET_HEADERS
1442 list(APPEND VNET_API_FILES teib/teib.api)
1444 ##############################################################################
1446 ##############################################################################
1448 list (APPEND VNET_SOURCES
1454 list(APPEND VNET_HEADERS
1458 list(APPEND VNET_API_FILES arp/arp.api)
1460 list (APPEND VNET_SOURCES
1464 ip6-nd/ip6_nd_proxy.c
1470 list(APPEND VNET_HEADERS
1474 list(APPEND VNET_API_FILES
1479 ##############################################################################
1481 ##############################################################################
1483 add_vpp_library(vnet
1484 SOURCES ${VNET_SOURCES}
1485 MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1486 INSTALL_HEADERS ${VNET_HEADERS}
1487 API_FILES ${VNET_API_FILES}
1488 LINK_LIBRARIES vppinfra svm vlib
1489 DEPENDS vpp_version_h api_headers
1492 ##############################################################################
1493 # vpp api test client library
1494 ##############################################################################
1496 add_vpp_library (vatclient
1497 SOURCES ip/ip_types_api.c
1501 ##############################################################################
1503 ##############################################################################
1504 add_vpp_test_library(vnet
1508 ##############################################################################