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
76 ethernet/ethernet_format_fns.h
79 list(APPEND VNET_API_FILES
87 ##############################################################################
89 ##############################################################################
90 list(APPEND VNET_SOURCES
97 list(APPEND VNET_MULTIARCH_SOURCES
101 list(APPEND VNET_HEADERS
107 list(APPEND VNET_API_FILES
109 policer/policer_types.api
112 ##############################################################################
113 # Layer 2 protocols go here
114 ##############################################################################
116 ##############################################################################
117 # Layer 2 protocol: Ethernet
118 ##############################################################################
119 list(APPEND VNET_SOURCES
120 ethernet/arp_packet.c
121 ethernet/ethernet_types_api.c
125 ethernet/mac_address.c
129 ethernet/p2p_ethernet.c
130 ethernet/p2p_ethernet_input.c
131 ethernet/p2p_ethernet_api.c
134 list(APPEND VNET_MULTIARCH_SOURCES
136 ethernet/p2p_ethernet_input.c
139 list(APPEND VNET_HEADERS
142 ethernet/mac_address.h
146 ethernet/p2p_ethernet.h
147 ethernet/arp_packet.h
150 list(APPEND VNET_API_FILES
151 ethernet/p2p_ethernet.api
152 ethernet/ethernet_types.api)
154 ##############################################################################
155 # Layer 2 protocol: Ethernet bridging
156 ##############################################################################
157 list(APPEND VNET_SOURCES
164 l2/l2_input_classify.c
165 l2/l2_output_classify.c
176 l2/l2_in_out_feat_arc.c
184 list(APPEND VNET_MULTIARCH_SOURCES
190 l2/l2_in_out_feat_arc.c
191 l2/l2_input_classify.c
193 l2/l2_output_classify.c
203 list(APPEND VNET_HEADERS
220 list(APPEND VNET_API_FILES l2/l2.api)
222 ##############################################################################
223 # Layer 2 protocol: SRP
224 ##############################################################################
225 list(APPEND VNET_SOURCES
232 list(APPEND VNET_HEADERS
237 ##############################################################################
238 # Layer 2 protocol: PPP
239 ##############################################################################
240 list(APPEND VNET_SOURCES
246 list(APPEND VNET_HEADERS
252 ##############################################################################
253 # Layer 2 protocol: HDLC
254 ##############################################################################
255 list(APPEND VNET_SOURCES
261 list(APPEND VNET_HEADERS
267 ##############################################################################
268 # Layer 2 protocol: LLC
269 ##############################################################################
270 list(APPEND VNET_SOURCES
276 list(APPEND VNET_HEADERS
280 ##############################################################################
281 # Layer 2 protocol: SNAP
282 ##############################################################################
283 list(APPEND VNET_SOURCES
289 list(APPEND VNET_HEADERS
293 ##############################################################################
295 ##############################################################################
296 list(APPEND VNET_SOURCES
303 list(APPEND VNET_MULTIARCH_SOURCES
307 list(APPEND VNET_HEADERS
310 vxlan/vxlan_error.def
313 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
315 list(APPEND VNET_API_FILES vxlan/vxlan.api)
317 ##############################################################################
319 ##############################################################################
320 list(APPEND VNET_SOURCES
327 list(APPEND VNET_HEADERS
331 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
332 list(APPEND VNET_API_FILES bonding/bond.api)
334 ##############################################################################
335 # Layer 2/3 "classify"
336 ##############################################################################
337 list(APPEND VNET_SOURCES
338 classify/vnet_classify.c
339 classify/trace_classify.h
340 classify/ip_classify.c
341 classify/in_out_acl.c
342 classify/policer_classify.c
343 classify/flow_classify.c
344 classify/flow_classify_node.c
345 classify/vnet_classify.h
346 classify/classify_api.c
349 list(APPEND VNET_MULTIARCH_SOURCES
350 classify/ip_classify.c
351 classify/flow_classify_node.c
354 list(APPEND VNET_HEADERS
355 classify/vnet_classify.h
356 classify/trace_classify.h
357 classify/in_out_acl.h
358 classify/policer_classify.h
359 classify/flow_classify.h
362 list(APPEND VNET_API_FILES classify/classify.api)
364 ##############################################################################
365 # Layer 3 protocols go here
366 ##############################################################################
368 ##############################################################################
369 # Layer 3 protocol: IP v4/v6
370 ##############################################################################
371 list(APPEND VNET_SOURCES
385 ip/ip4_source_and_port_range_check.c
386 ip/reass/ip4_full_reass.c
387 ip/reass/ip4_sv_reass.c
397 ip/reass/ip6_full_reass.c
398 ip/reass/ip6_sv_reass.c
401 ip/ip_container_proxy.c
408 ip/ip_path_mtu_node.c
418 list(APPEND VNET_MULTIARCH_SOURCES
420 ip/reass/ip4_full_reass.c
422 ip/reass/ip6_full_reass.c
423 ip/reass/ip4_sv_reass.c
425 ip/reass/ip6_full_reass.c
426 ip/reass/ip6_sv_reass.c
431 ip/ip_path_mtu_node.c
434 list(APPEND VNET_HEADERS
449 ip/ip6_hop_by_hop_packet.h
453 ip/ip_container_proxy.h
458 ip/ip_source_and_port_range_check.h
467 list(APPEND VNET_API_FILES
472 list(APPEND VNET_MULTIARCH_SOURCES
478 ##############################################################################
480 ##############################################################################
481 list(APPEND VNET_SOURCES
482 ip-neighbor/ip_neighbor.c
483 ip-neighbor/ip_neighbor_api.c
484 ip-neighbor/ip_neighbor_dp.c
485 ip-neighbor/ip_neighbor_types.c
486 ip-neighbor/ip_neighbor_watch.c
487 ip-neighbor/ip4_neighbor.c
488 ip-neighbor/ip6_neighbor.c
491 list(APPEND VNET_HEADERS
492 ip-neighbor/ip_neighbor.h
493 ip-neighbor/ip_neighbor_types.h
496 list(APPEND VNET_API_FILES
497 ip-neighbor/ip_neighbor.api
500 ##############################################################################
501 # Bidirectional Forwarding Detection
502 ##############################################################################
504 list(APPEND VNET_HEADERS
511 list(APPEND VNET_SOURCES
520 list(APPEND VNET_API_FILES bfd/bfd.api)
522 ##############################################################################
524 ##############################################################################
526 list(APPEND VNET_SOURCES
534 list(APPEND VNET_HEADERS
538 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
540 list(APPEND VNET_API_FILES crypto/crypto.api)
542 ##############################################################################
543 # Layer 3 protocol: IPSec
544 ##############################################################################
545 list(APPEND VNET_SOURCES
549 ipsec/ipsec_handoff.c
555 ipsec/ipsec_spd_policy.c
564 ipsec/ipsec_types_api.c
567 list(APPEND VNET_MULTIARCH_SOURCES
572 ipsec/ipsec_handoff.c
578 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
579 list(APPEND VNET_API_FILES ipsec/ipsec.api)
581 list(APPEND VNET_SOURCES
585 list(APPEND VNET_HEADERS
588 ipsec/ipsec_spd_policy.h
591 ipsec/ipsec_types_api.h
597 ##############################################################################
598 # Layer 3 protocol: osi
599 ##############################################################################
600 list(APPEND VNET_SOURCES
606 list(APPEND VNET_HEADERS
610 ##############################################################################
611 # Layer 4 protocol: tcp
612 ##############################################################################
613 list(APPEND VNET_SOURCES
617 tcp/tcp_syn_filter4.c
630 list(APPEND VNET_MULTIARCH_SOURCES
633 tcp/tcp_syn_filter4.c
636 list(APPEND VNET_HEADERS
649 list(APPEND VNET_API_FILES tcp/tcp.api)
651 ##############################################################################
652 # Layer 4 protocol: udp
653 ##############################################################################
654 list(APPEND VNET_SOURCES
666 list(APPEND VNET_MULTIARCH_SOURCES
671 list(APPEND VNET_HEADERS
679 list(APPEND VNET_API_FILES udp/udp.api)
681 ##############################################################################
682 # Tunnel protocol: gre
683 ##############################################################################
684 list(APPEND VNET_SOURCES
692 list(APPEND VNET_MULTIARCH_SOURCES
697 list(APPEND VNET_HEADERS
703 list(APPEND VNET_API_FILES gre/gre.api)
705 ##############################################################################
706 # Tunnel protocol: ipip
707 ##############################################################################
708 list(APPEND VNET_SOURCES
716 list(APPEND VNET_MULTIARCH_SOURCES
720 list(APPEND VNET_HEADERS
724 list(APPEND VNET_API_FILES
728 ##############################################################################
730 ##############################################################################
731 list(APPEND VNET_SOURCES
733 tunnel/tunnel_types_api.c
736 list(APPEND VNET_API_FILES
737 tunnel/tunnel_types.api
740 list(APPEND VNET_HEADERS
745 ##############################################################################
746 # Tunnel protocol: gre+mpls
747 ##############################################################################
748 list(APPEND VNET_SOURCES
760 list(APPEND VNET_MULTIARCH_SOURCES
767 list(APPEND VNET_HEADERS
775 list(APPEND VNET_API_FILES mpls/mpls.api)
777 ##############################################################################
778 # Tunnel protocol: vxlan-gbp
779 ##############################################################################
780 list(APPEND VNET_SOURCES
783 vxlan-gbp/vxlan_gbp_api.c
784 vxlan-gbp/vxlan_gbp.c
785 vxlan-gbp/vxlan_gbp_packet.c
788 list (APPEND VNET_MULTIARCH_SOURCES
793 list(APPEND VNET_HEADERS
794 vxlan-gbp/vxlan_gbp.h
795 vxlan-gbp/vxlan_gbp_packet.h
796 vxlan-gbp/vxlan_gbp_error.def
799 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
801 ##############################################################################
802 # Tunnel protocol: vxlan-gpe
803 ##############################################################################
805 list(APPEND VNET_SOURCES
806 vxlan-gpe/vxlan_gpe.c
809 vxlan-gpe/vxlan_gpe_api.c
812 list (APPEND VNET_MULTIARCH_SOURCES
816 list(APPEND VNET_HEADERS
817 vxlan-gpe/vxlan_gpe.h
818 vxlan-gpe/vxlan_gpe_packet.h
819 vxlan-gpe/vxlan_gpe_error.def
822 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
824 ##############################################################################
825 # ipv6 segment routing
826 ##############################################################################
828 list(APPEND VNET_SOURCES
831 srv6/sr_policy_rewrite.c
836 list(APPEND VNET_HEADERS
841 list(APPEND VNET_API_FILES
846 ##############################################################################
847 # mpls segment routing
848 ##############################################################################
850 list(APPEND VNET_SOURCES
851 srmpls/sr_mpls_policy.c
852 srmpls/sr_mpls_steering.c
856 list(APPEND VNET_HEADERS
860 list(APPEND VNET_API_FILES
864 ##############################################################################
865 # IPFIX / netflow v10
866 ##############################################################################
867 list(APPEND VNET_SOURCES
868 ipfix-export/flow_report.c
869 ipfix-export/flow_api.c
872 list(APPEND VNET_HEADERS
873 ipfix-export/flow_report.h
874 ipfix-export/ipfix_info_elements.h
875 ipfix-export/ipfix_packet.h
878 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
880 ##############################################################################
882 ##############################################################################
883 list(APPEND VNET_SOURCES
890 list(APPEND VNET_HEADERS
893 gso/hdr_offset_parser.h
897 list(APPEND VNET_API_FILES
901 ##############################################################################
902 # IPFIX classify code
903 ##############################################################################
905 list(APPEND VNET_SOURCES
906 ipfix-export/flow_report_classify.c
909 list(APPEND VNET_HEADERS
910 ipfix-export/flow_report_classify.h
913 ##############################################################################
915 ##############################################################################
917 list(APPEND VNET_SOURCES
918 lawful-intercept/lawful_intercept.c
919 lawful-intercept/node.c
922 list(APPEND VNET_MULTIARCH_SOURCES
923 lawful-intercept/node.c
926 list(APPEND VNET_HEADERS
927 lawful-intercept/lawful_intercept.h
930 ##############################################################################
931 # SPAN (port mirroring)
932 ##############################################################################
934 list(APPEND VNET_SOURCES
940 list(APPEND VNET_MULTIARCH_SOURCES
944 list(APPEND VNET_HEADERS
948 list(APPEND VNET_API_FILES span/span.api)
950 ##############################################################################
952 ##############################################################################
954 list(APPEND VNET_SOURCES
964 list(APPEND VNET_HEADERS
969 list(APPEND VNET_API_FILES pg/pg.api)
971 ##############################################################################
973 ##############################################################################
975 list(APPEND VNET_SOURCES
977 devices/virtio/device.c
978 devices/virtio/format.c
979 devices/virtio/node.c
981 devices/virtio/vhost_user.c
982 devices/virtio/vhost_user_input.c
983 devices/virtio/vhost_user_output.c
984 devices/virtio/vhost_user_api.c
985 devices/virtio/virtio.c
986 devices/virtio/virtio_api.c
987 devices/virtio/virtio_pci_legacy.c
988 devices/virtio/virtio_pci_modern.c
989 devices/virtio/virtio_process.c
990 devices/virtio/virtio_types_api.c
993 list(APPEND VNET_HEADERS
995 devices/virtio/virtio.h
996 devices/virtio/virtio_buffering.h
997 devices/virtio/virtio_std.h
998 devices/virtio/virtio_pci_legacy.h
999 devices/virtio/virtio_pci_modern.h
1000 devices/virtio/vhost_std.h
1001 devices/virtio/vhost_user.h
1002 devices/virtio/virtio_types_api.h
1005 list(APPEND VNET_MULTIARCH_SOURCES
1006 devices/virtio/vhost_user_input.c
1007 devices/virtio/vhost_user_output.c
1008 devices/virtio/node.c
1009 devices/af_packet/node.c
1010 devices/virtio/device.c
1013 list(APPEND VNET_API_FILES
1014 devices/virtio/vhost_user.api
1015 devices/virtio/virtio.api
1016 devices/virtio/virtio_types.api
1019 ##############################################################################
1020 # tap interface (with virtio backend)
1021 ##############################################################################
1023 list(APPEND VNET_SOURCES
1026 devices/tap/tapv2_api.c
1029 list(APPEND VNET_HEADERS
1033 list(APPEND VNET_API_FILES
1034 devices/tap/tapv2.api
1037 ##############################################################################
1038 # tap interface (with virtio backend)
1039 ##############################################################################
1041 list(APPEND VNET_SOURCES
1042 devices/pipe/pipe_api.c
1046 list(APPEND VNET_HEADERS
1050 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1052 ##############################################################################
1053 # session managmeent
1054 ##############################################################################
1056 list(APPEND VNET_SOURCES
1058 session/session_debug.c
1059 session/session_table.c
1060 session/session_rules_table.c
1061 session/session_lookup.c
1062 session/session_node.c
1064 session/application.c
1065 session/application_worker.c
1066 session/session_cli.c
1067 session/application_interface.c
1068 session/application_local.c
1069 session/application_namespace.c
1070 session/segment_manager.c
1071 session/session_api.c
1074 list(APPEND VNET_HEADERS
1076 session/session_table.h
1077 session/session_rules_table.h
1078 session/session_types.h
1079 session/session_lookup.h
1080 session/application.h
1082 session/transport_types.h
1083 session/application_interface.h
1084 session/application_local.h
1085 session/application_namespace.h
1086 session/session_debug.h
1087 session/segment_manager.h
1088 session/mma_template.h
1089 session/mma_template.c
1094 list(APPEND VNET_API_FILES session/session.api)
1096 ##############################################################################
1098 ##############################################################################
1100 list(APPEND VNET_SOURCES
1104 list(APPEND VNET_HEADERS
1109 ##############################################################################
1110 # Linux packet interface
1111 ##############################################################################
1113 list(APPEND VNET_SOURCES
1114 devices/af_packet/af_packet.c
1115 devices/af_packet/device.c
1116 devices/af_packet/node.c
1117 devices/af_packet/cli.c
1118 devices/af_packet/af_packet_api.c
1121 list(APPEND VNET_MULTIARCH_SOURCES
1122 devices/af_packet/device.c
1125 list(APPEND VNET_HEADERS
1126 devices/af_packet/af_packet.h
1129 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1131 ##############################################################################
1132 # Driver feature graph arc support
1133 ##############################################################################
1135 list(APPEND VNET_SOURCES
1137 feature/feature_api.c
1138 feature/registration.c
1141 list(APPEND VNET_HEADERS
1145 list(APPEND VNET_API_FILES feature/feature.api)
1147 ##############################################################################
1148 # Unix kernel related
1149 ##############################################################################
1151 # FIXME: unix/hgshm.c
1153 list(APPEND VNET_SOURCES
1158 list(APPEND VNET_HEADERS
1162 ##############################################################################
1164 ##############################################################################
1166 list(APPEND VNET_SOURCES
1178 fib/fib_entry_src_adj.c
1179 fib/fib_entry_src_api.c
1180 fib/fib_entry_src_drop.c
1181 fib/fib_entry_src_interface.c
1182 fib/fib_entry_src_interpose.c
1183 fib/fib_entry_src_lisp.c
1184 fib/fib_entry_src_mpls.c
1185 fib/fib_entry_src_simple.c
1186 fib/fib_entry_src_rr.c
1187 fib/fib_entry_cover.c
1188 fib/fib_entry_delegate.c
1189 fib/fib_entry_track.c
1196 fib/fib_attached_export.c
1201 list(APPEND VNET_HEADERS
1211 fib/fib_entry_delegate.h
1216 list(APPEND VNET_API_FILES
1221 ##############################################################################
1223 ##############################################################################
1225 list(APPEND VNET_SOURCES
1229 adj/adj_midchain_node.c
1230 adj/adj_midchain_delegate.c
1240 list(APPEND VNET_MULTIARCH_SOURCES
1243 adj/adj_midchain_node.c
1246 list(APPEND VNET_HEADERS
1256 ##############################################################################
1257 # Data-Plane Objects
1258 ##############################################################################
1260 list(APPEND VNET_SOURCES
1268 dpo/load_balance_map.c
1272 dpo/interface_rx_dpo.c
1273 dpo/interface_tx_dpo.c
1274 dpo/mpls_disposition.c
1275 dpo/mpls_label_dpo.c
1281 list(APPEND VNET_MULTIARCH_SOURCES
1283 dpo/mpls_disposition.c
1285 dpo/mpls_label_dpo.c
1286 dpo/interface_rx_dpo.c
1289 list(APPEND VNET_HEADERS
1301 ##############################################################################
1303 ##############################################################################
1305 list(APPEND VNET_SOURCES
1315 mfib/mfib_entry_cover.c
1316 mfib/mfib_entry_delegate.c
1317 mfib/mfib_entry_src.c
1318 mfib/mfib_entry_src_rr.c
1322 list(APPEND VNET_MULTIARCH_SOURCES
1326 list(APPEND VNET_HEADERS
1332 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1334 ##############################################################################
1336 ##############################################################################
1338 list(APPEND VNET_SOURCES
1344 list(APPEND VNET_HEADERS
1348 ##############################################################################
1350 ##############################################################################
1352 list(APPEND VNET_SOURCES
1355 qos/qos_egress_map.c
1357 qos/qos_record_node.c
1359 qos/qos_store_node.c
1364 list(APPEND VNET_MULTIARCH_SOURCES
1365 qos/qos_record_node.c
1369 list(APPEND VNET_API_FILES qos/qos.api)
1371 ##############################################################################
1373 ##############################################################################
1375 list(APPEND VNET_SOURCES
1376 bier/bier_bit_string.c
1379 bier/bier_fmask_db.c
1388 bier/bier_imp_node.c
1390 bier/bier_disp_entry.c
1391 bier/bier_disp_lookup_node.c
1392 bier/bier_disp_dispatch_node.c
1393 bier/bier_disp_table.c
1394 bier/bier_bift_table.c
1397 list(APPEND VNET_MULTIARCH_SOURCES
1398 bier/bier_disp_dispatch_node.c
1399 bier/bier_disp_lookup_node.c
1400 bier/bier_imp_node.c
1403 list(APPEND VNET_HEADERS
1410 list(APPEND VNET_API_FILES bier/bier.api)
1412 ##############################################################################
1414 ##############################################################################
1416 list (APPEND VNET_SOURCES
1422 list(APPEND VNET_HEADERS
1427 list(APPEND VNET_API_FILES syslog/syslog.api)
1429 ##############################################################################
1430 # Tunnel Endpoint Information Base
1431 ##############################################################################
1433 list (APPEND VNET_SOURCES
1439 list(APPEND VNET_HEADERS
1443 list(APPEND VNET_API_FILES teib/teib.api)
1445 ##############################################################################
1447 ##############################################################################
1449 list (APPEND VNET_SOURCES
1455 list(APPEND VNET_HEADERS
1459 list(APPEND VNET_API_FILES arp/arp.api)
1461 list (APPEND VNET_SOURCES
1465 ip6-nd/ip6_nd_proxy.c
1471 list(APPEND VNET_HEADERS
1475 list(APPEND VNET_API_FILES
1480 ##############################################################################
1482 ##############################################################################
1484 add_vpp_library(vnet
1485 SOURCES ${VNET_SOURCES}
1486 MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1487 INSTALL_HEADERS ${VNET_HEADERS}
1488 API_FILES ${VNET_API_FILES}
1489 LINK_LIBRARIES vppinfra svm vlib
1490 DEPENDS vpp_version_h api_headers
1493 ##############################################################################
1494 # vpp api test client library
1495 ##############################################################################
1497 add_vpp_library (vatclient
1498 SOURCES ip/ip_types_api.c
1502 ##############################################################################
1504 ##############################################################################
1505 add_vpp_test_library(vnet
1509 ##############################################################################