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