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