misc: move part of vpe apis to vlibmemory
[vpp.git] / src / vnet / CMakeLists.txt
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:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
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.
13
14 unset(VNET_SOURCES)
15 unset(VNET_HEADERS)
16 unset(VNET_API_FILES)
17 unset(VNET_MULTIARCH_SOURCES)
18
19 option(VPP_IP_FIB_MTRIE_16 "IP FIB's MTRIE Stride is 16-8-8 (if not set it's 8-8-8-8)" ON)
20
21 ##############################################################################
22 # Generic stuff
23 ##############################################################################
24 list(APPEND VNET_SOURCES
25   buffer.c
26   config.c
27   devices/devices.c
28   devices/netlink.c
29   flow/flow.c
30   flow/flow_cli.c
31   flow/flow_api.c
32   handoff.c
33   interface.c
34   interface_api.c
35   interface_cli.c
36   interface_format.c
37   interface_output.c
38   interface/rx_queue.c
39   interface/tx_queue.c
40   interface/runtime.c
41   interface_stats.c
42   misc.c
43 )
44
45 list(APPEND VNET_MULTIARCH_SOURCES
46   interface_output.c
47   interface_stats.c
48   handoff.c
49 )
50
51 list(APPEND VNET_HEADERS
52   api_errno.h
53   buffer.h
54   config.h
55   devices/devices.h
56   devices/netlink.h
57   flow/flow.h
58   global_funcs.h
59   handoff.h
60   interface/rx_queue_funcs.h
61   interface/tx_queue_funcs.h
62   interface.h
63   interface_funcs.h
64   interface_output.h
65   ip/ip4_to_ip6.h
66   ip/ip6_to_ip4.h
67   ip/ip_types_api.h
68   l3_types.h
69   plugin/plugin.h
70   pipeline.h
71   vnet.h
72   util/radix.h
73   util/refcount.h
74   format_fns.h
75   ip/ip_format_fns.h
76   ip/ip_sas.h
77   ethernet/ethernet_format_fns.h
78   ethernet/ethernet_types_api.h
79 )
80
81 list(APPEND VNET_API_FILES
82   interface.api
83   interface_types.api
84   ip/ip_types.api
85   flow/flow_types.api
86   flow/flow.api
87 )
88
89 ##############################################################################
90 # Policer infra
91 ##############################################################################
92 list(APPEND VNET_SOURCES
93   policer/node_funcs.c
94   policer/policer.c
95   policer/xlate.c
96   policer/policer_api.c
97 )
98
99 list(APPEND VNET_MULTIARCH_SOURCES
100   policer/node_funcs.c
101 )
102
103 list(APPEND VNET_HEADERS
104   policer/police.h
105   policer/policer.h
106   policer/xlate.h
107 )
108
109 list(APPEND VNET_API_FILES
110   policer/policer.api
111   policer/policer_types.api
112 )
113
114 ##############################################################################
115 # Layer 2 protocols go here
116 ##############################################################################
117
118 ##############################################################################
119 # Layer 2 protocol: Ethernet
120 ##############################################################################
121 list(APPEND VNET_SOURCES
122   ethernet/arp_packet.c
123   ethernet/ethernet_types_api.c
124   ethernet/format.c
125   ethernet/init.c
126   ethernet/interface.c
127   ethernet/mac_address.c
128   ethernet/node.c
129   ethernet/pg.c
130   ethernet/sfp.c
131   ethernet/p2p_ethernet.c
132   ethernet/p2p_ethernet_input.c
133   ethernet/p2p_ethernet_api.c
134 )
135
136 list(APPEND VNET_MULTIARCH_SOURCES
137   ethernet/node.c
138   ethernet/p2p_ethernet_input.c
139 )
140
141 list(APPEND VNET_HEADERS
142   ethernet/error.def
143   ethernet/ethernet.h
144   ethernet/mac_address.h
145   ethernet/packet.h
146   ethernet/types.def
147   ethernet/sfp.h
148   ethernet/p2p_ethernet.h
149   ethernet/arp_packet.h
150 )
151
152 list(APPEND VNET_API_FILES
153   ethernet/p2p_ethernet.api
154   ethernet/ethernet_types.api)
155
156 ##############################################################################
157 # Layer 2 protocol: Ethernet bridging
158 ##############################################################################
159 list(APPEND VNET_SOURCES
160   l2/feat_bitmap.c
161   l2/l2_api.c
162   l2/l2_arp_term.c
163   l2/l2_bd.c
164   l2/l2_bvi.c
165   l2/l2_bvi_node.c
166   l2/l2_input_classify.c
167   l2/l2_output_classify.c
168   l2/l2_efp_filter.c
169   l2/l2_fib.c
170   l2/l2_flood.c
171   l2/l2_fwd.c
172   l2/l2_input.c
173   l2/l2_input_node.c
174   l2/l2_input_vtr.c
175   l2/l2_learn.c
176   l2/l2_output.c
177   l2/l2_in_out_acl.c
178   l2/l2_in_out_feat_arc.c
179   l2/l2_patch.c
180   l2/l2_rw.c
181   l2/l2_uu_fwd.c
182   l2/l2_vtr.c
183   l2/l2_xcrw.c
184 )
185
186 list(APPEND VNET_MULTIARCH_SOURCES
187   l2/l2_bvi_node.c
188   l2/l2_fwd.c
189   l2/l2_learn.c
190   l2/l2_output.c
191   l2/l2_patch.c
192   l2/l2_in_out_feat_arc.c
193   l2/l2_input_classify.c
194   l2/l2_input_node.c
195   l2/l2_output_classify.c
196   l2/l2_flood.c
197   l2/l2_uu_fwd.c
198   l2/l2_efp_filter.c
199   l2/l2_rw.c
200   l2/l2_xcrw.c
201   l2/l2_in_out_acl.c
202   l2/l2_input_vtr.c
203 )
204
205 list(APPEND VNET_HEADERS
206   l2/feat_bitmap.h
207   l2/l2_input.h
208   l2/l2_output.h
209   l2/l2_vtr.h
210   l2/l2_input_vtr.h
211   l2/l2_efp_filter.h
212   l2/l2_fwd.h
213   l2/l2_bd.h
214   l2/l2_bvi.h
215   l2/l2_flood.h
216   l2/l2_fib.h
217   l2/l2_rw.h
218   l2/l2_xcrw.h
219   l2/l2_classify.h
220 )
221
222 list(APPEND VNET_API_FILES l2/l2.api)
223
224 ##############################################################################
225 # Layer 2 protocol: SRP
226 ##############################################################################
227 list(APPEND VNET_SOURCES
228   srp/format.c
229   srp/interface.c
230   srp/node.c
231   srp/pg.c
232 )
233
234 list(APPEND VNET_HEADERS
235   srp/packet.h
236   srp/srp.h
237 )
238
239 ##############################################################################
240 # Layer 2 protocol: PPP
241 ##############################################################################
242 list(APPEND VNET_SOURCES
243   ppp/node.c
244   ppp/pg.c
245   ppp/ppp.c
246 )
247
248 list(APPEND VNET_HEADERS
249   ppp/error.def
250   ppp/ppp.h
251   ppp/packet.h
252 )
253
254 ##############################################################################
255 # Layer 2 protocol: HDLC
256 ##############################################################################
257 list(APPEND VNET_SOURCES
258   hdlc/node.c
259   hdlc/pg.c
260   hdlc/hdlc.c
261 )
262
263 list(APPEND VNET_HEADERS
264   hdlc/error.def
265   hdlc/hdlc.h
266   hdlc/packet.h
267 )
268
269 ##############################################################################
270 # Layer 2 protocol: LLC
271 ##############################################################################
272 list(APPEND VNET_SOURCES
273   llc/llc.c
274   llc/node.c
275   llc/pg.c
276 )
277
278 list(APPEND VNET_HEADERS
279   llc/llc.h
280 )
281
282 ##############################################################################
283 # Layer 2 protocol: SNAP
284 ##############################################################################
285 list(APPEND VNET_SOURCES
286   snap/snap.c
287   snap/node.c
288   snap/pg.c
289 )
290
291 list(APPEND VNET_HEADERS
292   snap/snap.h
293 )
294
295 ##############################################################################
296 # Layer 2 / vxlan
297 ##############################################################################
298 list(APPEND VNET_SOURCES
299   vxlan/vxlan.c
300   vxlan/encap.c
301   vxlan/decap.c
302   vxlan/vxlan_api.c
303 )
304
305 list(APPEND VNET_MULTIARCH_SOURCES
306   vxlan/encap.c
307 )
308
309 list(APPEND VNET_HEADERS
310   vxlan/vxlan.h
311   vxlan/vxlan_packet.h
312   vxlan/vxlan_error.def
313 )
314
315 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
316
317 list(APPEND VNET_API_FILES vxlan/vxlan.api)
318
319 ##############################################################################
320 # Layer 2 / Bonding
321 ##############################################################################
322 list(APPEND VNET_SOURCES
323   bonding/cli.c
324   bonding/node.c
325   bonding/device.c
326   bonding/bond_api.c
327 )
328
329 list(APPEND VNET_HEADERS
330   bonding/node.h
331 )
332
333 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
334 list(APPEND VNET_API_FILES bonding/bond.api)
335
336 ##############################################################################
337 # Layer 2/3 "classify"
338 ##############################################################################
339 list(APPEND VNET_SOURCES
340   classify/vnet_classify.c
341   classify/trace_classify.h
342   classify/ip_classify.c
343   classify/in_out_acl.c
344   classify/policer_classify.c
345   classify/flow_classify.c
346   classify/flow_classify_node.c
347   classify/vnet_classify.h
348   classify/classify_api.c
349 )
350
351 list(APPEND VNET_MULTIARCH_SOURCES
352   classify/ip_classify.c
353   classify/flow_classify_node.c
354 )
355
356 list(APPEND VNET_HEADERS
357   classify/vnet_classify.h
358   classify/trace_classify.h
359   classify/in_out_acl.h
360   classify/policer_classify.h
361   classify/flow_classify.h
362 )
363
364 list(APPEND VNET_API_FILES classify/classify.api)
365
366 ##############################################################################
367 # Layer 3 protocols go here
368 ##############################################################################
369
370 ##############################################################################
371 # Layer 3 protocol: IP v4/v6
372 ##############################################################################
373 list(APPEND VNET_SOURCES
374   ip/format.c
375   ip/icmp4.c
376   ip/icmp6.c
377   ip/ip46_cli.c
378   ip/ip_types_api.c
379   ip/ip46_address.c
380   ip/ip4_format.c
381   ip/ip4_forward.c
382   ip/ip4_punt_drop.c
383   ip/ip4_input.c
384   ip/ip4_options.c
385   ip/ip4_mtrie.c
386   ip/ip4_pg.c
387   ip/ip4_source_and_port_range_check.c
388   ip/reass/ip4_full_reass.c
389   ip/reass/ip4_sv_reass.c
390   ip/ip6_format.c
391   ip/ip6_forward.c
392   ip/ip6_ll_table.c
393   ip/ip6_ll_types.c
394   ip/ip6_punt_drop.c
395   ip/ip6_hop_by_hop.c
396   ip/ip6_input.c
397   ip/ip6_link.c
398   ip/ip6_pg.c
399   ip/reass/ip6_full_reass.c
400   ip/reass/ip6_sv_reass.c
401   ip/ip_api.c
402   ip/ip_checksum.c
403   ip/ip_container_proxy.c
404   ip/ip_frag.c
405   ip/ip.c
406   ip/ip_interface.c
407   ip/ip_init.c
408   ip/ip_in_out_acl.c
409   ip/ip_path_mtu.c
410   ip/ip_path_mtu_node.c
411   ip/ip_punt_drop.c
412   ip/ip_types.c
413   ip/lookup.c
414   ip/punt_api.c
415   ip/punt.c
416   ip/punt_node.c
417   ip/vtep.c
418   ip/ip_sas.c
419 )
420
421 list(APPEND VNET_MULTIARCH_SOURCES
422   ip/ip4_punt_drop.c
423   ip/reass/ip4_full_reass.c
424   ip/ip6_hop_by_hop.c
425   ip/reass/ip6_full_reass.c
426   ip/reass/ip4_sv_reass.c
427   ip/ip6_hop_by_hop.c
428   ip/reass/ip6_full_reass.c
429   ip/reass/ip6_sv_reass.c
430   ip/ip6_input.c
431   ip/ip6_punt_drop.c
432   ip/punt_node.c
433   ip/ip_in_out_acl.c
434   ip/ip_path_mtu_node.c
435 )
436
437 list(APPEND VNET_HEADERS
438   ip/format.h
439   ip/icmp46_packet.h
440   ip/icmp4.h
441   ip/icmp6.h
442   ip/igmp_packet.h
443   ip/ip4_error.h
444   ip/ip4.h
445   ip/ip4_mtrie.h
446   ip/ip4_inlines.h
447   ip/ip4_packet.h
448   ip/ip46_address.h
449   ip/ip6_error.h
450   ip/ip6.h
451   ip/ip6_hop_by_hop.h
452   ip/ip6_hop_by_hop_packet.h
453   ip/ip6_inlines.h
454   ip/ip6_packet.h
455   ip/ip.h
456   ip/ip_container_proxy.h
457   ip/ip_flow_hash.h
458   ip/ip_table.h
459   ip/ip_interface.h
460   ip/ip_packet.h
461   ip/ip_source_and_port_range_check.h
462   ip/ip_types.h
463   ip/lookup.h
464   ip/ports.def
465   ip/protocols.def
466   ip/punt_error.def
467   ip/punt.h
468 )
469
470 list(APPEND VNET_API_FILES
471   ip/ip.api
472   ip/punt.api
473 )
474
475 list(APPEND VNET_MULTIARCH_SOURCES
476   ip/ip4_forward.c
477   ip/ip6_forward.c
478   ip/ip4_input.c
479 )
480
481 ##############################################################################
482 # Layer 3 neighbours
483 ##############################################################################
484 list(APPEND VNET_SOURCES
485   ip-neighbor/ip_neighbor.c
486   ip-neighbor/ip_neighbor_api.c
487   ip-neighbor/ip_neighbor_dp.c
488   ip-neighbor/ip_neighbor_types.c
489   ip-neighbor/ip_neighbor_watch.c
490   ip-neighbor/ip4_neighbor.c
491   ip-neighbor/ip6_neighbor.c
492 )
493
494 list(APPEND VNET_HEADERS
495   ip-neighbor/ip_neighbor.h
496   ip-neighbor/ip_neighbor_types.h
497 )
498
499 list(APPEND VNET_API_FILES
500   ip-neighbor/ip_neighbor.api
501 )
502
503 ##############################################################################
504 # Bidirectional Forwarding Detection
505 ##############################################################################
506
507 list(APPEND VNET_HEADERS
508   bfd/bfd_protocol.h
509   bfd/bfd_main.h
510   bfd/bfd_api.h
511   bfd/bfd_udp.h
512 )
513
514 list(APPEND VNET_SOURCES
515   bfd/bfd_api.h
516   bfd/bfd_udp.c
517   bfd/bfd_main.c
518   bfd/bfd_protocol.c
519   bfd/bfd_cli.c
520   bfd/bfd_api.c
521 )
522
523 list(APPEND VNET_API_FILES bfd/bfd.api)
524
525 ##############################################################################
526 # Crypto
527 ##############################################################################
528
529 list(APPEND VNET_SOURCES
530   crypto/cli.c
531   crypto/crypto.c
532   crypto/format.c
533   crypto/node.c
534   crypto/crypto_api.c
535 )
536
537 list(APPEND VNET_HEADERS
538   crypto/crypto.h
539 )
540
541 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
542
543 list(APPEND VNET_API_FILES crypto/crypto.api)
544
545 ##############################################################################
546 # Layer 3 protocol: IPSec
547 ##############################################################################
548 list(APPEND VNET_SOURCES
549   ipsec/ipsec.c
550   ipsec/ipsec_cli.c
551   ipsec/ipsec_format.c
552   ipsec/ipsec_handoff.c
553   ipsec/ipsec_input.c
554   ipsec/ipsec_itf.c
555   ipsec/ipsec_punt.c
556   ipsec/ipsec_sa.c
557   ipsec/ipsec_spd.c
558   ipsec/ipsec_spd_policy.c
559   ipsec/ipsec_tun.c
560   ipsec/ipsec_tun_in.c
561   ipsec/esp_format.c
562   ipsec/esp_encrypt.c
563   ipsec/esp_decrypt.c
564   ipsec/ah_decrypt.c
565   ipsec/ah_encrypt.c
566   ipsec/ipsec_api.c
567   ipsec/ipsec_types_api.c
568 )
569
570 list(APPEND VNET_MULTIARCH_SOURCES
571   ipsec/esp_encrypt.c
572   ipsec/esp_decrypt.c
573   ipsec/ah_decrypt.c
574   ipsec/ah_encrypt.c
575   ipsec/ipsec_handoff.c
576   ipsec/ipsec_output.c
577   ipsec/ipsec_input.c
578   ipsec/ipsec_tun_in.c
579 )
580
581 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
582 list(APPEND VNET_API_FILES ipsec/ipsec.api)
583
584 list(APPEND VNET_SOURCES
585   ipsec/ipsec_output.c
586 )
587
588 list(APPEND VNET_HEADERS
589   ipsec/ipsec.h
590   ipsec/ipsec_spd.h
591   ipsec/ipsec_spd_policy.h
592   ipsec/ipsec_sa.h
593   ipsec/ipsec_tun.h
594   ipsec/ipsec_types_api.h
595   ipsec/ipsec_punt.h
596   ipsec/esp.h
597   ipsec/ah.h
598 )
599
600 ##############################################################################
601 # Layer 3 protocol: osi
602 ##############################################################################
603 list(APPEND VNET_SOURCES
604   osi/node.c
605   osi/osi.c
606   osi/pg.c
607 )
608
609 list(APPEND VNET_HEADERS
610   osi/osi.h
611 )
612
613 ##############################################################################
614 # Layer 4 protocol: tcp
615 ##############################################################################
616 list(APPEND VNET_SOURCES
617   tcp/tcp_api.c
618   tcp/tcp_format.c
619   tcp/tcp_pg.c
620   tcp/tcp_syn_filter4.c
621   tcp/tcp_output.c
622   tcp/tcp_input.c
623   tcp/tcp_newreno.c
624   tcp/tcp_bt.c
625   tcp/tcp_cli.c
626   tcp/tcp_cubic.c
627   tcp/tcp_debug.c
628   tcp/tcp_sack.c
629   tcp/tcp_timer.c
630   tcp/tcp.c
631 )
632
633 list(APPEND VNET_MULTIARCH_SOURCES
634   tcp/tcp_input.c
635   tcp/tcp_output.c
636   tcp/tcp_syn_filter4.c
637 )
638
639 list(APPEND VNET_HEADERS
640   tcp/tcp_packet.h
641   tcp/tcp_timer.h
642   tcp/tcp_bt.h
643   tcp/tcp_cc.h
644   tcp/tcp_debug.h
645   tcp/tcp_inlines.h
646   tcp/tcp_sack.h
647   tcp/tcp_types.h
648   tcp/tcp.h
649   tcp/tcp_error.def
650 )
651
652 list(APPEND VNET_API_FILES tcp/tcp.api)
653
654 ##############################################################################
655 # Layer 4 protocol: udp
656 ##############################################################################
657 list(APPEND VNET_SOURCES
658   udp/udp.c
659   udp/udp_cli.c
660   udp/udp_input.c
661   udp/udp_format.c
662   udp/udp_local.c
663   udp/udp_pg.c
664   udp/udp_encap_node.c
665   udp/udp_encap.c
666   udp/udp_decap.c
667   udp/udp_api.c
668 )
669
670 list(APPEND VNET_MULTIARCH_SOURCES
671   udp/udp_local.c
672   udp/udp_encap_node.c
673 )
674
675 list(APPEND VNET_HEADERS
676   udp/udp_error.def
677   udp/udp.h
678   udp/udp_packet.h
679   udp/udp_inlines.h
680   udp/udp_local.h
681 )
682
683 list(APPEND VNET_API_FILES udp/udp.api)
684
685 ##############################################################################
686 # Tunnel protocol: gre
687 ##############################################################################
688 list(APPEND VNET_SOURCES
689   gre/gre.c
690   gre/node.c
691   gre/interface.c
692   gre/pg.c
693   gre/gre_api.c
694 )
695
696 list(APPEND VNET_MULTIARCH_SOURCES
697   gre/node.c
698   gre/gre.c
699 )
700
701 list(APPEND VNET_HEADERS
702   gre/gre.h
703   gre/packet.h
704   gre/error.def
705 )
706
707 list(APPEND VNET_API_FILES gre/gre.api)
708
709 ##############################################################################
710 # Tunnel protocol: ipip
711 ##############################################################################
712 list(APPEND VNET_SOURCES
713   ipip/ipip.c
714   ipip/node.c
715   ipip/sixrd.c
716   ipip/ipip_api.c
717   ipip/ipip_cli.c
718 )
719
720 list(APPEND VNET_MULTIARCH_SOURCES
721   ipip/node.c
722 )
723
724 list(APPEND VNET_HEADERS
725   ipip/ipip.h
726 )
727
728 list(APPEND VNET_API_FILES
729   ipip/ipip.api
730 )
731
732 ##############################################################################
733 # Tunnel infra
734 ##############################################################################
735 list(APPEND VNET_SOURCES
736   tunnel/tunnel.c
737   tunnel/tunnel_types_api.c
738 )
739
740 list(APPEND VNET_API_FILES
741   tunnel/tunnel_types.api
742 )
743
744 list(APPEND VNET_HEADERS
745   tunnel/tunnel.h
746   tunnel/tunnel_dp.h
747 )
748
749 ##############################################################################
750 # Tunnel protocol: gre+mpls
751 ##############################################################################
752 list(APPEND VNET_SOURCES
753   mpls/mpls.c
754   mpls/mpls_lookup.c
755   mpls/mpls_output.c
756   mpls/mpls_features.c
757   mpls/mpls_input.c
758   mpls/interface.c
759   mpls/mpls_tunnel.c
760   mpls/pg.c
761   mpls/mpls_api.c
762 )
763
764 list(APPEND VNET_MULTIARCH_SOURCES
765   mpls/mpls_output.c
766   mpls/mpls_input.c
767   mpls/mpls_lookup.c
768   mpls/mpls_features.c
769 )
770
771 list(APPEND VNET_HEADERS
772   mpls/mpls.h
773   mpls/mpls_types.h
774   mpls/mpls_tunnel.h
775   mpls/packet.h
776   mpls/error.def
777 )
778
779 list(APPEND VNET_API_FILES mpls/mpls.api)
780
781 ##############################################################################
782 # Tunnel protocol: vxlan-gbp
783 ##############################################################################
784 list(APPEND VNET_SOURCES
785   vxlan-gbp/decap.c
786   vxlan-gbp/encap.c
787   vxlan-gbp/vxlan_gbp_api.c
788   vxlan-gbp/vxlan_gbp.c
789   vxlan-gbp/vxlan_gbp_packet.c
790 )
791
792 list (APPEND VNET_MULTIARCH_SOURCES
793   vxlan-gbp/decap.c
794   vxlan-gbp/encap.c
795 )
796
797 list(APPEND VNET_HEADERS
798   vxlan-gbp/vxlan_gbp.h
799   vxlan-gbp/vxlan_gbp_packet.h
800   vxlan-gbp/vxlan_gbp_error.def
801 )
802
803 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
804
805 ##############################################################################
806 # Tunnel protocol: vxlan-gpe
807 ##############################################################################
808
809 list(APPEND VNET_SOURCES
810   vxlan-gpe/vxlan_gpe.c
811   vxlan-gpe/encap.c
812   vxlan-gpe/decap.c
813   vxlan-gpe/vxlan_gpe_api.c
814 )
815
816 list (APPEND VNET_MULTIARCH_SOURCES
817   vxlan-gpe/decap.c
818 )
819
820 list(APPEND VNET_HEADERS
821   vxlan-gpe/vxlan_gpe.h
822   vxlan-gpe/vxlan_gpe_packet.h
823   vxlan-gpe/vxlan_gpe_error.def
824 )
825
826 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
827
828 ##############################################################################
829 # ipv6 segment routing
830 ##############################################################################
831
832 list(APPEND VNET_SOURCES
833   srv6/sr.c
834   srv6/sr_localsid.c
835   srv6/sr_policy_rewrite.c
836   srv6/sr_steering.c
837   srv6/sr_api.c
838 )
839
840 list(APPEND VNET_HEADERS
841   srv6/sr_packet.h
842   srv6/sr.h
843 )
844
845 list(APPEND VNET_API_FILES
846   srv6/sr.api
847   srv6/sr_types.api
848 )
849
850 ##############################################################################
851 # mpls segment routing
852 ##############################################################################
853
854 list(APPEND VNET_SOURCES
855   srmpls/sr_mpls_policy.c
856   srmpls/sr_mpls_steering.c
857   srmpls/sr_mpls_api.c
858 )
859
860 list(APPEND VNET_HEADERS
861   srmpls/sr_mpls.h
862 )
863
864 list(APPEND VNET_API_FILES
865   srmpls/sr_mpls.api
866 )
867
868 ##############################################################################
869 # IPFIX / netflow v10
870 ##############################################################################
871 list(APPEND VNET_SOURCES
872   ipfix-export/flow_report.c
873   ipfix-export/flow_api.c
874 )
875
876 list(APPEND VNET_HEADERS
877   ipfix-export/flow_report.h
878   ipfix-export/ipfix_info_elements.h
879   ipfix-export/ipfix_packet.h
880 )
881
882 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
883
884 ##############################################################################
885 # HASH
886 ##############################################################################
887 list(APPEND VNET_SOURCES
888   hash/hash.c
889   hash/cli.c
890   hash/crc32_5tuple.c
891 )
892
893 list(APPEND VNET_HEADERS
894   hash/hash.h
895 )
896
897 ##############################################################################
898 # GSO
899 ##############################################################################
900 list(APPEND VNET_SOURCES
901   gso/cli.c
902   gso/gso.c
903   gso/gso_api.c
904   gso/node.c
905 )
906
907 list(APPEND VNET_HEADERS
908   gso/gro.h
909   gso/gro_func.h
910   gso/hdr_offset_parser.h
911   gso/gso.h
912 )
913
914 list(APPEND VNET_API_FILES
915   gso/gso.api
916 )
917
918 ##############################################################################
919 # IPFIX classify code
920 ##############################################################################
921
922 list(APPEND VNET_SOURCES
923   ipfix-export/flow_report_classify.c
924 )
925
926 list(APPEND VNET_HEADERS
927   ipfix-export/flow_report_classify.h
928 )
929
930 ##############################################################################
931 # lawful intercept
932 ##############################################################################
933
934 list(APPEND VNET_SOURCES
935   lawful-intercept/lawful_intercept.c
936   lawful-intercept/node.c
937 )
938
939 list(APPEND VNET_MULTIARCH_SOURCES
940   lawful-intercept/node.c
941 )
942
943 list(APPEND VNET_HEADERS
944   lawful-intercept/lawful_intercept.h
945 )
946
947 ##############################################################################
948 # SPAN (port mirroring)
949 ##############################################################################
950
951 list(APPEND VNET_SOURCES
952   span/span_api.c
953   span/span.c
954   span/node.c
955 )
956
957 list(APPEND VNET_MULTIARCH_SOURCES
958   span/node.c
959 )
960
961 list(APPEND VNET_HEADERS
962   span/span.h
963 )
964
965 list(APPEND VNET_API_FILES span/span.api)
966
967 ##############################################################################
968 # Packet generator
969 ##############################################################################
970
971 list(APPEND VNET_SOURCES
972   pg/cli.c
973   pg/edit.c
974   pg/init.c
975   pg/input.c
976   pg/output.c
977   pg/stream.c
978   pg/pg_api.c
979 )
980
981 list(APPEND VNET_HEADERS
982   pg/pg.h
983   pg/edit.h
984 )
985
986 list(APPEND VNET_API_FILES pg/pg.api)
987
988 ##############################################################################
989 # virtio
990 ##############################################################################
991
992 list(APPEND VNET_SOURCES
993   devices/virtio/cli.c
994   devices/virtio/device.c
995   devices/virtio/format.c
996   devices/virtio/node.c
997   devices/virtio/pci.c
998   devices/virtio/vhost_user.c
999   devices/virtio/vhost_user_input.c
1000   devices/virtio/vhost_user_output.c
1001   devices/virtio/vhost_user_api.c
1002   devices/virtio/virtio.c
1003   devices/virtio/virtio_api.c
1004   devices/virtio/virtio_pci_legacy.c
1005   devices/virtio/virtio_pci_modern.c
1006   devices/virtio/virtio_process.c
1007   devices/virtio/virtio_types_api.c
1008 )
1009
1010 list(APPEND VNET_HEADERS
1011   devices/virtio/pci.h
1012   devices/virtio/virtio.h
1013   devices/virtio/virtio_buffering.h
1014   devices/virtio/virtio_std.h
1015   devices/virtio/virtio_pci_legacy.h
1016   devices/virtio/virtio_pci_modern.h
1017   devices/virtio/vhost_std.h
1018   devices/virtio/vhost_user.h
1019   devices/virtio/virtio_types_api.h
1020 )
1021
1022 list(APPEND VNET_MULTIARCH_SOURCES
1023   devices/virtio/vhost_user_input.c
1024   devices/virtio/vhost_user_output.c
1025   devices/virtio/node.c
1026   devices/af_packet/node.c
1027   devices/virtio/device.c
1028 )
1029
1030 list(APPEND VNET_API_FILES
1031   devices/virtio/vhost_user.api
1032   devices/virtio/virtio.api
1033   devices/virtio/virtio_types.api
1034 )
1035
1036 ##############################################################################
1037 # tap interface (with virtio backend)
1038 ##############################################################################
1039
1040 list(APPEND VNET_SOURCES
1041   devices/tap/cli.c
1042   devices/tap/tap.c
1043   devices/tap/tapv2_api.c
1044 )
1045
1046 list(APPEND VNET_HEADERS
1047   devices/tap/tap.h
1048 )
1049
1050 list(APPEND VNET_API_FILES
1051   devices/tap/tapv2.api
1052 )
1053
1054 ##############################################################################
1055 # tap interface (with virtio backend)
1056 ##############################################################################
1057
1058 list(APPEND VNET_SOURCES
1059   devices/pipe/pipe_api.c
1060   devices/pipe/pipe.c
1061 )
1062
1063 list(APPEND VNET_HEADERS
1064   devices/pipe/pipe.h
1065 )
1066
1067 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1068
1069 ##############################################################################
1070 # session managmeent
1071 ##############################################################################
1072
1073 list(APPEND VNET_SOURCES
1074   session/session.c
1075   session/session_debug.c
1076   session/session_table.c
1077   session/session_rules_table.c
1078   session/session_lookup.c
1079   session/session_node.c
1080   session/transport.c
1081   session/application.c
1082   session/application_worker.c
1083   session/session_cli.c
1084   session/application_interface.c
1085   session/application_local.c
1086   session/application_namespace.c
1087   session/segment_manager.c
1088   session/session_api.c
1089 )
1090
1091 list(APPEND VNET_HEADERS
1092   session/session.h
1093   session/session_table.h
1094   session/session_rules_table.h
1095   session/session_types.h
1096   session/session_lookup.h
1097   session/application.h
1098   session/transport.h
1099   session/transport_types.h
1100   session/application_interface.h
1101   session/application_local.h
1102   session/application_namespace.h
1103   session/session_debug.h
1104   session/segment_manager.h
1105   session/mma_template.h
1106   session/mma_template.c
1107   session/mma_16.h
1108   session/mma_40.h
1109 )
1110
1111 list(APPEND VNET_API_FILES session/session.api)
1112
1113 ##############################################################################
1114 # TLS protocol
1115 ##############################################################################
1116
1117 list(APPEND VNET_SOURCES
1118   tls/tls.c
1119 )
1120
1121 list(APPEND VNET_HEADERS
1122   tls/tls.h
1123   tls/tls_test.h
1124 )
1125
1126 ##############################################################################
1127 # Linux packet interface
1128 ##############################################################################
1129
1130 list(APPEND VNET_SOURCES
1131   devices/af_packet/af_packet.c
1132   devices/af_packet/device.c
1133   devices/af_packet/node.c
1134   devices/af_packet/cli.c
1135   devices/af_packet/af_packet_api.c
1136 )
1137
1138 list(APPEND VNET_MULTIARCH_SOURCES
1139   devices/af_packet/device.c
1140 )
1141
1142 list(APPEND VNET_HEADERS
1143   devices/af_packet/af_packet.h
1144 )
1145
1146 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1147
1148 ##############################################################################
1149 # Driver feature graph arc support
1150 ##############################################################################
1151
1152 list(APPEND VNET_SOURCES
1153   feature/feature.c
1154   feature/feature_api.c
1155   feature/registration.c
1156 )
1157
1158 list(APPEND VNET_HEADERS
1159   feature/feature.h
1160 )
1161
1162 list(APPEND VNET_API_FILES feature/feature.api)
1163
1164 ##############################################################################
1165 # Unix kernel related
1166 ##############################################################################
1167
1168 # FIXME: unix/hgshm.c
1169
1170 list(APPEND VNET_SOURCES
1171   unix/gdb_funcs.c
1172   unix/tuntap.c
1173 )
1174
1175 list(APPEND VNET_HEADERS
1176   unix/tuntap.h
1177 )
1178
1179 ##############################################################################
1180 # FIB
1181 ##############################################################################
1182
1183 list(APPEND VNET_SOURCES
1184   fib/fib.c
1185   fib/ip4_fib_hash.c
1186   fib/ip4_fib.c
1187   fib/ip4_fib_16.c
1188   fib/ip4_fib_8.c
1189   fib/ip6_fib.c
1190   fib/mpls_fib.c
1191   fib/fib_table.c
1192   fib/fib_walk.c
1193   fib/fib_types.c
1194   fib/fib_node.c
1195   fib/fib_node_list.c
1196   fib/fib_entry.c
1197   fib/fib_entry_src.c
1198   fib/fib_entry_src_adj.c
1199   fib/fib_entry_src_api.c
1200   fib/fib_entry_src_drop.c
1201   fib/fib_entry_src_interface.c
1202   fib/fib_entry_src_interpose.c
1203   fib/fib_entry_src_lisp.c
1204   fib/fib_entry_src_mpls.c
1205   fib/fib_entry_src_simple.c
1206   fib/fib_entry_src_rr.c
1207   fib/fib_entry_cover.c
1208   fib/fib_entry_delegate.c
1209   fib/fib_entry_track.c
1210   fib/fib_path_list.c
1211   fib/fib_path.c
1212   fib/fib_path_ext.c
1213   fib/fib_sas.c
1214   fib/fib_source.c
1215   fib/fib_urpf_list.c
1216   fib/fib_attached_export.c
1217   fib/fib_api.c
1218   fib/fib_bfd.c
1219 )
1220
1221 list(APPEND VNET_HEADERS
1222   fib/fib.h
1223   fib/fib_api.h
1224   fib/ip4_fib.h
1225   fib/ip6_fib.h
1226   fib/fib_types.h
1227   fib/fib_table.h
1228   fib/fib_node.h
1229   fib/fib_node_list.h
1230   fib/fib_entry.h
1231   fib/fib_entry_delegate.h
1232   fib/fib_sas.h
1233   fib/fib_source.h
1234 )
1235
1236 list(APPEND VNET_API_FILES
1237   fib/fib_types.api
1238   fib/fib.api
1239 )
1240
1241 ##############################################################################
1242 # ADJ
1243 ##############################################################################
1244
1245 list(APPEND VNET_SOURCES
1246   adj/adj_nbr.c
1247   adj/adj_glean.c
1248   adj/adj_midchain.c
1249   adj/adj_midchain_node.c
1250   adj/adj_midchain_delegate.c
1251   adj/adj_mcast.c
1252   adj/adj_l2.c
1253   adj/adj_nsh.c
1254   adj/adj.c
1255   adj/rewrite.c
1256   adj/adj_bfd.c
1257   adj/adj_delegate.c
1258 )
1259
1260 list(APPEND VNET_MULTIARCH_SOURCES
1261   adj/adj_nsh.c
1262   adj/adj_l2.c
1263   adj/adj_midchain_node.c
1264 )
1265
1266 list(APPEND VNET_HEADERS
1267   adj/adj.h
1268   adj/adj_types.h
1269   adj/adj_glean.h
1270   adj/adj_nsh.h
1271   adj/adj_nbr.h
1272   adj/adj_midchain.h
1273   adj/rewrite.h
1274 )
1275
1276 ##############################################################################
1277 # Data-Plane Objects
1278 ##############################################################################
1279
1280 list(APPEND VNET_SOURCES
1281   dpo/dpo.c
1282   dpo/drop_dpo.c
1283   dpo/ip_null_dpo.c
1284   dpo/ip6_ll_dpo.c
1285   dpo/punt_dpo.c
1286   dpo/receive_dpo.c
1287   dpo/load_balance.c
1288   dpo/load_balance_map.c
1289   dpo/lookup_dpo.c
1290   dpo/classify_dpo.c
1291   dpo/replicate_dpo.c
1292   dpo/interface_rx_dpo.c
1293   dpo/interface_tx_dpo.c
1294   dpo/mpls_disposition.c
1295   dpo/mpls_label_dpo.c
1296   dpo/l3_proxy_dpo.c
1297   dpo/dvr_dpo.c
1298   dpo/pw_cw.c
1299 )
1300
1301 list(APPEND VNET_MULTIARCH_SOURCES
1302   dpo/lookup_dpo.h
1303   dpo/mpls_disposition.c
1304   dpo/dvr_dpo.c
1305   dpo/mpls_label_dpo.c
1306   dpo/interface_rx_dpo.c
1307 )
1308
1309 list(APPEND VNET_HEADERS
1310   dpo/load_balance.h
1311   dpo/drop_dpo.h
1312   dpo/lookup_dpo.h
1313   dpo/punt_dpo.h
1314   dpo/classify_dpo.h
1315   dpo/receive_dpo.h
1316   dpo/ip_null_dpo.h
1317   dpo/replicate_dpo.h
1318   dpo/dpo.h
1319 )
1320
1321 ##############################################################################
1322 # Multicast FIB
1323 ##############################################################################
1324
1325 list(APPEND VNET_SOURCES
1326   mfib/mfib_forward.c
1327   mfib/ip4_mfib.c
1328   mfib/ip6_mfib.c
1329   mfib/mfib_api.c
1330   mfib/mfib_types.c
1331   mfib/mfib_signal.c
1332   mfib/mfib_itf.c
1333   mfib/mfib_entry.c
1334   mfib/mfib_entry.c
1335   mfib/mfib_entry_cover.c
1336   mfib/mfib_entry_delegate.c
1337   mfib/mfib_entry_src.c
1338   mfib/mfib_entry_src_rr.c
1339   mfib/mfib_table.c
1340 )
1341
1342 list(APPEND VNET_MULTIARCH_SOURCES
1343   mfib/mfib_forward.c
1344 )
1345
1346 list(APPEND VNET_HEADERS
1347   mfib/ip4_mfib.h
1348   mfib/mfib_types.h
1349   mfib/mfib_table.h
1350 )
1351
1352 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1353
1354 ##############################################################################
1355 # Utilities
1356 ##############################################################################
1357
1358 list(APPEND VNET_SOURCES
1359   util/radix.c
1360   util/refcount.c
1361   util/throttle.c
1362 )
1363
1364 list(APPEND VNET_HEADERS
1365   util/throttle.h
1366 )
1367
1368 ##############################################################################
1369 # QoS
1370 ##############################################################################
1371
1372 list(APPEND VNET_SOURCES
1373   qos/qos_types.c
1374   qos/qos_api.c
1375   qos/qos_egress_map.c
1376   qos/qos_record.c
1377   qos/qos_record_node.c
1378   qos/qos_store.c
1379   qos/qos_store_node.c
1380   qos/qos_mark.c
1381   qos/qos_mark_node.c
1382 )
1383
1384 list(APPEND VNET_MULTIARCH_SOURCES
1385   qos/qos_record_node.c
1386   qos/qos_mark_node.c
1387 )
1388
1389 list(APPEND VNET_API_FILES qos/qos.api)
1390
1391 ##############################################################################
1392 # BIER
1393 ##############################################################################
1394
1395 list(APPEND VNET_SOURCES
1396   bier/bier_bit_string.c
1397   bier/bier_entry.c
1398   bier/bier_fmask.c
1399   bier/bier_fmask_db.c
1400   bier/bier_input.c
1401   bier/bier_lookup.c
1402   bier/bier_output.c
1403   bier/bier_table.c
1404   bier/bier_types.c
1405   bier/bier_api.c
1406   bier/bier_drop.c
1407   bier/bier_update.c
1408   bier/bier_imp_node.c
1409   bier/bier_imp.c
1410   bier/bier_disp_entry.c
1411   bier/bier_disp_lookup_node.c
1412   bier/bier_disp_dispatch_node.c
1413   bier/bier_disp_table.c
1414   bier/bier_bift_table.c
1415 )
1416
1417 list(APPEND VNET_MULTIARCH_SOURCES
1418   bier/bier_disp_dispatch_node.c
1419   bier/bier_disp_lookup_node.c
1420   bier/bier_imp_node.c
1421 )
1422
1423 list(APPEND VNET_HEADERS
1424   bier/bier_types.h
1425   bier/bier_entry.h
1426   bier/bier_update.h
1427   bier/bier_table.h
1428 )
1429
1430 list(APPEND VNET_API_FILES bier/bier.api)
1431
1432 ##############################################################################
1433 # SYSLOG
1434 ##############################################################################
1435
1436 list (APPEND VNET_SOURCES
1437   syslog/syslog_api.c
1438   syslog/syslog_udp.c
1439   syslog/syslog.c
1440 )
1441
1442 list(APPEND VNET_HEADERS
1443   syslog/syslog_udp.h
1444   syslog/syslog.h
1445 )
1446
1447 list(APPEND VNET_API_FILES syslog/syslog.api)
1448
1449 ##############################################################################
1450 # Tunnel Endpoint Information Base
1451 ##############################################################################
1452
1453 list (APPEND VNET_SOURCES
1454   teib/teib_api.c
1455   teib/teib_cli.c
1456   teib/teib.c
1457 )
1458
1459 list(APPEND VNET_HEADERS
1460   teib/teib.h
1461 )
1462
1463 list(APPEND VNET_API_FILES teib/teib.api)
1464
1465 ##############################################################################
1466 # ARP/ND
1467 ##############################################################################
1468
1469 list (APPEND VNET_SOURCES
1470   arp/arp_api.c
1471   arp/arp.c
1472   arp/arp_proxy.c
1473 )
1474
1475 list(APPEND VNET_HEADERS
1476   arp/arp.h
1477 )
1478
1479 list(APPEND VNET_API_FILES arp/arp.api)
1480
1481 list (APPEND VNET_SOURCES
1482   ip6-nd/ip6_mld.c
1483   ip6-nd/ip6_nd.c
1484   ip6-nd/ip6_nd_api.c
1485   ip6-nd/ip6_nd_proxy.c
1486   ip6-nd/ip6_nd_mirror_proxy.c
1487   ip6-nd/ip6_ra.c
1488   ip6-nd/rd_cp.c
1489   ip6-nd/rd_cp_api.c
1490 )
1491
1492 list(APPEND VNET_HEADERS
1493   ip6-nd/ip6_nd.h
1494 )
1495
1496 list(APPEND VNET_API_FILES
1497   ip6-nd/ip6_nd.api
1498   ip6-nd/rd_cp.api
1499 )
1500
1501 ##############################################################################
1502 # VNET Library
1503 ##############################################################################
1504
1505 add_vpp_library(vnet
1506   SOURCES ${VNET_SOURCES}
1507   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1508   INSTALL_HEADERS ${VNET_HEADERS}
1509   API_FILES ${VNET_API_FILES}
1510   LINK_LIBRARIES vppinfra svm vlib
1511   DEPENDS vpp_version_h api_headers
1512 )
1513
1514 ##############################################################################
1515 # vpp api test client library
1516 ##############################################################################
1517
1518 add_vpp_library (vatclient
1519   SOURCES ip/ip_types_api.c
1520   DEPENDS api_headers
1521 )
1522
1523 add_vat_test_library(vnet
1524   ip/ip_test.c
1525   arp/arp_test.c
1526   ip6-nd/ip6_nd_test.c
1527 )
1528
1529 ##############################################################################
1530 # VAT2 plugins
1531 ##############################################################################
1532 add_vpp_test_library(vnet
1533   ${VNET_API_FILES}
1534 )
1535
1536 ##############################################################################