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