fib: Source Address Selection
[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 add_definitions (-DWITH_LIBSSL=1)
15 include_directories(${OPENSSL_INCLUDE_DIR})
16
17 unset(VNET_SOURCES)
18 unset(VNET_HEADERS)
19 unset(VNET_API_FILES)
20 unset(VNET_MULTIARCH_SOURCES)
21
22 ##############################################################################
23 # Generic stuff
24 ##############################################################################
25 list(APPEND VNET_SOURCES
26   buffer.c
27   config.c
28   devices/devices.c
29   devices/netlink.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_stats.c
40   misc.c
41 )
42
43 list(APPEND VNET_MULTIARCH_SOURCES
44   interface_output.c
45   interface_stats.c
46   handoff.c
47 )
48
49 list(APPEND VNET_HEADERS
50   api_errno.h
51   buffer.h
52   config.h
53   devices/devices.h
54   devices/netlink.h
55   flow/flow.h
56   global_funcs.h
57   handoff.h
58   interface.h
59   interface_funcs.h
60   interface_output.h
61   ip/ip4_to_ip6.h
62   ip/ip6_to_ip4.h
63   ip/ip_types_api.h
64   l3_types.h
65   plugin/plugin.h
66   pipeline.h
67   vnet.h
68   vnet_all_api_h.h
69   vnet_msg_enum.h
70   util/radix.h
71   util/refcount.h
72   format_fns.h
73   ip/ip_format_fns.h
74   ethernet/ethernet_format_fns.h
75 )
76
77 list(APPEND VNET_API_FILES
78   interface.api
79   interface_types.api
80   ip/ip_types.api
81   flow/flow_types.api
82   flow/flow.api
83 )
84
85 ##############################################################################
86 # Policer infra
87 ##############################################################################
88 list(APPEND VNET_SOURCES
89   policer/node_funcs.c
90   policer/policer.c
91   policer/xlate.c
92   policer/policer_api.c
93 )
94
95 list(APPEND VNET_MULTIARCH_SOURCES
96   policer/node_funcs.c
97 )
98
99 list(APPEND VNET_HEADERS
100   policer/police.h
101   policer/policer.h
102   policer/xlate.h
103 )
104
105 list(APPEND VNET_API_FILES
106   policer/policer.api
107   policer/policer_types.api
108 )
109
110 ##############################################################################
111 # Binary API compatibility until vpp 20.12, see the ADL plugin...
112 ##############################################################################
113
114 list(APPEND VNET_SOURCES
115   cop/cop_api.c
116 )
117
118 list(APPEND VNET_API_FILES cop/cop.api)
119
120 ##############################################################################
121 # Layer 2 protocols go here
122 ##############################################################################
123
124 ##############################################################################
125 # Layer 2 protocol: Ethernet
126 ##############################################################################
127 list(APPEND VNET_SOURCES
128   ethernet/arp_packet.c
129   ethernet/ethernet_types_api.c
130   ethernet/format.c
131   ethernet/init.c
132   ethernet/interface.c
133   ethernet/mac_address.c
134   ethernet/node.c
135   ethernet/pg.c
136   ethernet/sfp.c
137   ethernet/p2p_ethernet.c
138   ethernet/p2p_ethernet_input.c
139   ethernet/p2p_ethernet_api.c
140 )
141
142 list(APPEND VNET_MULTIARCH_SOURCES
143   ethernet/node.c
144   ethernet/p2p_ethernet_input.c
145 )
146
147 list(APPEND VNET_HEADERS
148   ethernet/error.def
149   ethernet/ethernet.h
150   ethernet/mac_address.h
151   ethernet/packet.h
152   ethernet/types.def
153   ethernet/sfp.h
154   ethernet/p2p_ethernet.h
155   ethernet/arp_packet.h
156 )
157
158 list(APPEND VNET_API_FILES
159   ethernet/p2p_ethernet.api
160   ethernet/ethernet_types.api)
161
162 ##############################################################################
163 # Layer 2 protocol: Ethernet bridging
164 ##############################################################################
165 list(APPEND VNET_SOURCES
166   l2/feat_bitmap.c
167   l2/l2_api.c
168   l2/l2_arp_term.c
169   l2/l2_bd.c
170   l2/l2_bvi.c
171   l2/l2_bvi_node.c
172   l2/l2_input_classify.c
173   l2/l2_output_classify.c
174   l2/l2_efp_filter.c
175   l2/l2_fib.c
176   l2/l2_flood.c
177   l2/l2_fwd.c
178   l2/l2_input.c
179   l2/l2_input_node.c
180   l2/l2_input_vtr.c
181   l2/l2_learn.c
182   l2/l2_output.c
183   l2/l2_in_out_acl.c
184   l2/l2_in_out_feat_arc.c
185   l2/l2_patch.c
186   l2/l2_rw.c
187   l2/l2_uu_fwd.c
188   l2/l2_vtr.c
189   l2/l2_xcrw.c
190 )
191
192 list(APPEND VNET_MULTIARCH_SOURCES
193   l2/l2_bvi_node.c
194   l2/l2_fwd.c
195   l2/l2_learn.c
196   l2/l2_output.c
197   l2/l2_patch.c
198   l2/l2_in_out_feat_arc.c
199   l2/l2_input_classify.c
200   l2/l2_input_node.c
201   l2/l2_output_classify.c
202   l2/l2_flood.c
203   l2/l2_uu_fwd.c
204   l2/l2_efp_filter.c
205   l2/l2_rw.c
206   l2/l2_xcrw.c
207   l2/l2_in_out_acl.c
208   l2/l2_input_vtr.c
209 )
210
211 list(APPEND VNET_HEADERS
212   l2/feat_bitmap.h
213   l2/l2_input.h
214   l2/l2_output.h
215   l2/l2_vtr.h
216   l2/l2_input_vtr.h
217   l2/l2_efp_filter.h
218   l2/l2_fwd.h
219   l2/l2_bd.h
220   l2/l2_bvi.h
221   l2/l2_flood.h
222   l2/l2_fib.h
223   l2/l2_rw.h
224   l2/l2_xcrw.h
225   l2/l2_classify.h
226 )
227
228 list(APPEND VNET_API_FILES l2/l2.api)
229
230 ##############################################################################
231 # Layer 2 protocol: SRP
232 ##############################################################################
233 list(APPEND VNET_SOURCES
234   srp/format.c
235   srp/interface.c
236   srp/node.c
237   srp/pg.c
238 )
239
240 list(APPEND VNET_HEADERS
241   srp/packet.h
242   srp/srp.h
243 )
244
245 ##############################################################################
246 # Layer 2 protocol: PPP
247 ##############################################################################
248 list(APPEND VNET_SOURCES
249   ppp/node.c
250   ppp/pg.c
251   ppp/ppp.c
252 )
253
254 list(APPEND VNET_HEADERS
255   ppp/error.def
256   ppp/ppp.h
257   ppp/packet.h
258 )
259
260 ##############################################################################
261 # Layer 2 protocol: HDLC
262 ##############################################################################
263 list(APPEND VNET_SOURCES
264   hdlc/node.c
265   hdlc/pg.c
266   hdlc/hdlc.c
267 )
268
269 list(APPEND VNET_HEADERS
270   hdlc/error.def
271   hdlc/hdlc.h
272   hdlc/packet.h
273 )
274
275 ##############################################################################
276 # Layer 2 protocol: LLC
277 ##############################################################################
278 list(APPEND VNET_SOURCES
279   llc/llc.c
280   llc/node.c
281   llc/pg.c
282 )
283
284 list(APPEND VNET_HEADERS
285   llc/llc.h
286 )
287
288 ##############################################################################
289 # Layer 2 protocol: SNAP
290 ##############################################################################
291 list(APPEND VNET_SOURCES
292   snap/snap.c
293   snap/node.c
294   snap/pg.c
295 )
296
297 list(APPEND VNET_HEADERS
298   snap/snap.h
299 )
300
301 ##############################################################################
302 # Layer 2 / vxlan
303 ##############################################################################
304 list(APPEND VNET_SOURCES
305   vxlan/vxlan.c
306   vxlan/encap.c
307   vxlan/decap.c
308   vxlan/vxlan_api.c
309 )
310
311 list(APPEND VNET_MULTIARCH_SOURCES
312   vxlan/encap.c
313 )
314
315 list(APPEND VNET_HEADERS
316   vxlan/vxlan.h
317   vxlan/vxlan_packet.h
318   vxlan/vxlan_error.def
319 )
320
321 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
322
323 list(APPEND VNET_API_FILES vxlan/vxlan.api)
324
325 ##############################################################################
326 # Layer 2 / Bonding
327 ##############################################################################
328 list(APPEND VNET_SOURCES
329   bonding/cli.c
330   bonding/node.c
331   bonding/device.c
332   bonding/bond_api.c
333 )
334
335 list(APPEND VNET_HEADERS
336   bonding/node.h
337 )
338
339 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
340 list(APPEND VNET_API_FILES bonding/bond.api)
341
342 ##############################################################################
343 # Layer 2/3 "classify"
344 ##############################################################################
345 list(APPEND VNET_SOURCES
346   classify/vnet_classify.c
347   classify/trace_classify.h
348   classify/ip_classify.c
349   classify/in_out_acl.c
350   classify/policer_classify.c
351   classify/flow_classify.c
352   classify/flow_classify_node.c
353   classify/vnet_classify.h
354   classify/classify_api.c
355 )
356
357 list(APPEND VNET_MULTIARCH_SOURCES
358   classify/ip_classify.c
359   classify/flow_classify_node.c
360 )
361
362 list(APPEND VNET_HEADERS
363   classify/vnet_classify.h
364   classify/trace_classify.h
365   classify/in_out_acl.h
366   classify/policer_classify.h
367   classify/flow_classify.h
368 )
369
370 list(APPEND VNET_API_FILES classify/classify.api)
371
372 ##############################################################################
373 # Layer 3 protocols go here
374 ##############################################################################
375
376 ##############################################################################
377 # Layer 3 protocol: IP v4/v6
378 ##############################################################################
379 list(APPEND VNET_SOURCES
380   ip/format.c
381   ip/icmp4.c
382   ip/icmp6.c
383   ip/ip46_cli.c
384   ip/ip_types_api.c
385   ip/ip46_address.c
386   ip/ip4_format.c
387   ip/ip4_forward.c
388   ip/ip4_punt_drop.c
389   ip/ip4_input.c
390   ip/ip4_options.c
391   ip/ip4_mtrie.c
392   ip/ip4_pg.c
393   ip/ip4_source_and_port_range_check.c
394   ip/reass/ip4_full_reass.c
395   ip/reass/ip4_sv_reass.c
396   ip/ip6_format.c
397   ip/ip6_forward.c
398   ip/ip6_ll_table.c
399   ip/ip6_ll_types.c
400   ip/ip6_punt_drop.c
401   ip/ip6_hop_by_hop.c
402   ip/ip6_input.c
403   ip/ip6_link.c
404   ip/ip6_pg.c
405   ip/reass/ip6_full_reass.c
406   ip/reass/ip6_sv_reass.c
407   ip/ip_api.c
408   ip/ip_checksum.c
409   ip/ip_container_proxy.c
410   ip/ip_frag.c
411   ip/ip.c
412   ip/ip_interface.c
413   ip/ip_init.c
414   ip/ip_in_out_acl.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 )
423
424 list(APPEND VNET_MULTIARCH_SOURCES
425   ip/ip4_punt_drop.c
426   ip/reass/ip4_full_reass.c
427   ip/ip6_hop_by_hop.c
428   ip/reass/ip6_full_reass.c
429   ip/reass/ip4_sv_reass.c
430   ip/ip6_hop_by_hop.c
431   ip/reass/ip6_full_reass.c
432   ip/reass/ip6_sv_reass.c
433   ip/ip6_input.c
434   ip/ip6_punt_drop.c
435   ip/punt_node.c
436   ip/ip_in_out_acl.c
437 )
438
439 list(APPEND VNET_HEADERS
440   ip/format.h
441   ip/icmp46_packet.h
442   ip/icmp4.h
443   ip/icmp6.h
444   ip/igmp_packet.h
445   ip/ip4_error.h
446   ip/ip4.h
447   ip/ip4_mtrie.h
448   ip/ip4_inlines.h
449   ip/ip4_packet.h
450   ip/ip46_address.h
451   ip/ip6_error.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_source_and_port_range_check.h
464   ip/ip_types.h
465   ip/lookup.h
466   ip/ports.def
467   ip/protocols.def
468   ip/punt_error.def
469   ip/punt.h
470 )
471
472 list(APPEND VNET_API_FILES
473   ip/ip.api
474   ip/punt.api
475 )
476
477 list(APPEND VNET_MULTIARCH_SOURCES
478   ip/ip4_forward.c
479   ip/ip6_forward.c
480   ip/ip4_input.c
481 )
482
483 ##############################################################################
484 # Layer 3 neighbours
485 ##############################################################################
486 list(APPEND VNET_SOURCES
487   ip-neighbor/ip_neighbor.c
488   ip-neighbor/ip_neighbor_api.c
489   ip-neighbor/ip_neighbor_dp.c
490   ip-neighbor/ip_neighbor_types.c
491   ip-neighbor/ip_neighbor_watch.c
492   ip-neighbor/ip4_neighbor.c
493   ip-neighbor/ip6_neighbor.c
494 )
495
496 list(APPEND VNET_HEADERS
497   ip-neighbor/ip_neighbor.h
498   ip-neighbor/ip_neighbor_types.h
499 )
500
501 list(APPEND VNET_API_FILES
502   ip-neighbor/ip_neighbor.api
503 )
504
505 ##############################################################################
506 # Bidirectional Forwarding Detection
507 ##############################################################################
508
509 list(APPEND VNET_HEADERS
510   bfd/bfd_protocol.h
511   bfd/bfd_main.h
512   bfd/bfd_api.h
513   bfd/bfd_udp.h
514 )
515
516 list(APPEND VNET_SOURCES
517   bfd/bfd_api.h
518   bfd/bfd_udp.c
519   bfd/bfd_main.c
520   bfd/bfd_protocol.c
521   bfd/bfd_cli.c
522   bfd/bfd_api.c
523 )
524
525 list(APPEND VNET_API_FILES bfd/bfd.api)
526
527 ##############################################################################
528 # Crypto
529 ##############################################################################
530
531 list(APPEND VNET_SOURCES
532   crypto/cli.c
533   crypto/crypto.c
534   crypto/format.c
535   crypto/node.c
536   crypto/crypto_api.c
537 )
538
539 list(APPEND VNET_HEADERS
540   crypto/crypto.h
541 )
542
543 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
544
545 list(APPEND VNET_API_FILES crypto/crypto.api)
546
547 ##############################################################################
548 # Layer 3 protocol: IPSec
549 ##############################################################################
550 list(APPEND VNET_SOURCES
551   ipsec/ipsec.c
552   ipsec/ipsec_cli.c
553   ipsec/ipsec_format.c
554   ipsec/ipsec_handoff.c
555   ipsec/ipsec_input.c
556   ipsec/ipsec_itf.c
557   ipsec/ipsec_punt.c
558   ipsec/ipsec_sa.c
559   ipsec/ipsec_spd.c
560   ipsec/ipsec_spd_policy.c
561   ipsec/ipsec_tun.c
562   ipsec/ipsec_tun_in.c
563   ipsec/esp_format.c
564   ipsec/esp_encrypt.c
565   ipsec/esp_decrypt.c
566   ipsec/ah_decrypt.c
567   ipsec/ah_encrypt.c
568   ipsec/ipsec_api.c
569   ipsec/ipsec_types_api.c
570 )
571
572 list(APPEND VNET_MULTIARCH_SOURCES
573   ipsec/esp_encrypt.c
574   ipsec/esp_decrypt.c
575   ipsec/ah_decrypt.c
576   ipsec/ah_encrypt.c
577   ipsec/ipsec_handoff.c
578   ipsec/ipsec_output.c
579   ipsec/ipsec_input.c
580   ipsec/ipsec_tun_in.c
581 )
582
583 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
584 list(APPEND VNET_API_FILES ipsec/ipsec.api)
585
586 list(APPEND VNET_SOURCES
587   ipsec/ipsec_output.c
588 )
589
590 list(APPEND VNET_HEADERS
591   ipsec/ipsec.h
592   ipsec/ipsec_spd.h
593   ipsec/ipsec_spd_policy.h
594   ipsec/ipsec_sa.h
595   ipsec/ipsec_tun.h
596   ipsec/ipsec_types_api.h
597   ipsec/ipsec_punt.h
598   ipsec/esp.h
599   ipsec/ah.h
600 )
601
602 ##############################################################################
603 # Layer 3 protocol: osi
604 ##############################################################################
605 list(APPEND VNET_SOURCES
606   osi/node.c
607   osi/osi.c
608   osi/pg.c
609 )
610
611 list(APPEND VNET_HEADERS
612   osi/osi.h
613 )
614
615 ##############################################################################
616 # Layer 4 protocol: tcp
617 ##############################################################################
618 list(APPEND VNET_SOURCES
619   tcp/tcp_api.c
620   tcp/tcp_format.c
621   tcp/tcp_pg.c
622   tcp/tcp_syn_filter4.c
623   tcp/tcp_output.c
624   tcp/tcp_input.c
625   tcp/tcp_newreno.c
626   tcp/tcp_bt.c
627   tcp/tcp_cli.c
628   tcp/tcp_cubic.c
629   tcp/tcp_debug.c
630   tcp/tcp_sack.c
631   tcp/tcp_timer.c
632   tcp/tcp.c
633 )
634
635 list(APPEND VNET_MULTIARCH_SOURCES
636   tcp/tcp_input.c
637   tcp/tcp_output.c
638   tcp/tcp_syn_filter4.c
639 )
640
641 list(APPEND VNET_HEADERS
642   tcp/tcp_packet.h
643   tcp/tcp_timer.h
644   tcp/tcp_bt.h
645   tcp/tcp_cc.h
646   tcp/tcp_debug.h
647   tcp/tcp_inlines.h
648   tcp/tcp_sack.h
649   tcp/tcp_types.h
650   tcp/tcp.h
651   tcp/tcp_error.def
652 )
653
654 list(APPEND VNET_API_FILES tcp/tcp.api)
655
656 ##############################################################################
657 # Layer 4 protocol: udp
658 ##############################################################################
659 list(APPEND VNET_SOURCES
660   udp/udp.c
661   udp/udp_cli.c
662   udp/udp_input.c
663   udp/udp_format.c
664   udp/udp_local.c
665   udp/udp_pg.c
666   udp/udp_encap_node.c
667   udp/udp_encap.c
668   udp/udp_api.c
669 )
670
671 list(APPEND VNET_MULTIARCH_SOURCES
672   udp/udp_local.c
673   udp/udp_encap_node.c
674 )
675
676 list(APPEND VNET_HEADERS
677   udp/udp_error.def
678   udp/udp.h
679   udp/udp_packet.h
680   udp/udp_inlines.h
681   udp/udp_local.h
682 )
683
684 list(APPEND VNET_API_FILES udp/udp.api)
685
686 ##############################################################################
687 # Tunnel protocol: gre
688 ##############################################################################
689 list(APPEND VNET_SOURCES
690   gre/gre.c
691   gre/node.c
692   gre/interface.c
693   gre/pg.c
694   gre/gre_api.c
695 )
696
697 list(APPEND VNET_MULTIARCH_SOURCES
698   gre/node.c
699   gre/gre.c
700 )
701
702 list(APPEND VNET_HEADERS
703   gre/gre.h
704   gre/packet.h
705   gre/error.def
706 )
707
708 list(APPEND VNET_API_FILES gre/gre.api)
709
710 ##############################################################################
711 # Tunnel protocol: ipip
712 ##############################################################################
713 list(APPEND VNET_SOURCES
714   ipip/ipip.c
715   ipip/node.c
716   ipip/sixrd.c
717   ipip/ipip_api.c
718   ipip/ipip_cli.c
719 )
720
721 list(APPEND VNET_MULTIARCH_SOURCES
722   ipip/node.c
723 )
724
725 list(APPEND VNET_HEADERS
726   ipip/ipip.h
727 )
728
729 list(APPEND VNET_API_FILES
730   ipip/ipip.api
731 )
732
733 ##############################################################################
734 # Tunnel infra
735 ##############################################################################
736 list(APPEND VNET_SOURCES
737   tunnel/tunnel.c
738   tunnel/tunnel_types_api.c
739 )
740
741 list(APPEND VNET_API_FILES
742   tunnel/tunnel_types.api
743 )
744
745 list(APPEND VNET_HEADERS
746   tunnel/tunnel.h
747   tunnel/tunnel_dp.h
748 )
749
750 ##############################################################################
751 # Tunnel protocol: gre+mpls
752 ##############################################################################
753 list(APPEND VNET_SOURCES
754   mpls/mpls.c
755   mpls/mpls_lookup.c
756   mpls/mpls_output.c
757   mpls/mpls_features.c
758   mpls/mpls_input.c
759   mpls/interface.c
760   mpls/mpls_tunnel.c
761   mpls/pg.c
762   mpls/mpls_api.c
763 )
764
765 list(APPEND VNET_MULTIARCH_SOURCES
766   mpls/mpls_output.c
767   mpls/mpls_input.c
768   mpls/mpls_lookup.c
769   mpls/mpls_features.c
770 )
771
772 list(APPEND VNET_HEADERS
773   mpls/mpls.h
774   mpls/mpls_types.h
775   mpls/mpls_tunnel.h
776   mpls/packet.h
777   mpls/error.def
778 )
779
780 list(APPEND VNET_API_FILES mpls/mpls.api)
781
782 ##############################################################################
783 # Tunnel protocol: vxlan-gbp
784 ##############################################################################
785 list(APPEND VNET_SOURCES
786   vxlan-gbp/decap.c
787   vxlan-gbp/encap.c
788   vxlan-gbp/vxlan_gbp_api.c
789   vxlan-gbp/vxlan_gbp.c
790   vxlan-gbp/vxlan_gbp_packet.c
791 )
792
793 list (APPEND VNET_MULTIARCH_SOURCES
794   vxlan-gbp/decap.c
795   vxlan-gbp/encap.c
796 )
797
798 list(APPEND VNET_HEADERS
799   vxlan-gbp/vxlan_gbp.h
800   vxlan-gbp/vxlan_gbp_packet.h
801   vxlan-gbp/vxlan_gbp_error.def
802 )
803
804 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
805
806 ##############################################################################
807 # Tunnel protocol: vxlan-gpe
808 ##############################################################################
809
810 list(APPEND VNET_SOURCES
811   vxlan-gpe/vxlan_gpe.c
812   vxlan-gpe/encap.c
813   vxlan-gpe/decap.c
814   vxlan-gpe/vxlan_gpe_api.c
815 )
816
817 list (APPEND VNET_MULTIARCH_SOURCES
818   vxlan-gpe/decap.c
819 )
820
821 list(APPEND VNET_HEADERS
822   vxlan-gpe/vxlan_gpe.h
823   vxlan-gpe/vxlan_gpe_packet.h
824   vxlan-gpe/vxlan_gpe_error.def
825 )
826
827 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
828
829 ##############################################################################
830 # ipv6 segment routing
831 ##############################################################################
832
833 list(APPEND VNET_SOURCES
834   srv6/sr.c
835   srv6/sr_localsid.c
836   srv6/sr_policy_rewrite.c
837   srv6/sr_steering.c
838   srv6/sr_api.c
839 )
840
841 list(APPEND VNET_HEADERS
842   srv6/sr_packet.h
843   srv6/sr.h
844 )
845
846 list(APPEND VNET_API_FILES
847   srv6/sr.api
848   srv6/sr_types.api
849 )
850
851 ##############################################################################
852 # mpls segment routing
853 ##############################################################################
854
855 list(APPEND VNET_SOURCES
856   srmpls/sr_mpls_policy.c
857   srmpls/sr_mpls_steering.c
858   srmpls/sr_mpls_api.c
859 )
860
861 list(APPEND VNET_HEADERS
862   srmpls/sr_mpls.h
863 )
864
865 list(APPEND VNET_API_FILES
866   srmpls/sr_mpls.api
867 )
868
869 ##############################################################################
870 # IPFIX / netflow v10
871 ##############################################################################
872 list(APPEND VNET_SOURCES
873   ipfix-export/flow_report.c
874   ipfix-export/flow_api.c
875 )
876
877 list(APPEND VNET_HEADERS
878   ipfix-export/flow_report.h
879   ipfix-export/ipfix_info_elements.h
880   ipfix-export/ipfix_packet.h
881 )
882
883 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
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_process.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.c
1174   fib/ip6_fib.c
1175   fib/mpls_fib.c
1176   fib/fib_table.c
1177   fib/fib_walk.c
1178   fib/fib_types.c
1179   fib/fib_node.c
1180   fib/fib_node_list.c
1181   fib/fib_entry.c
1182   fib/fib_entry_src.c
1183   fib/fib_entry_src_adj.c
1184   fib/fib_entry_src_api.c
1185   fib/fib_entry_src_drop.c
1186   fib/fib_entry_src_interface.c
1187   fib/fib_entry_src_interpose.c
1188   fib/fib_entry_src_lisp.c
1189   fib/fib_entry_src_mpls.c
1190   fib/fib_entry_src_simple.c
1191   fib/fib_entry_src_rr.c
1192   fib/fib_entry_cover.c
1193   fib/fib_entry_delegate.c
1194   fib/fib_entry_track.c
1195   fib/fib_path_list.c
1196   fib/fib_path.c
1197   fib/fib_path_ext.c
1198   fib/fib_sas.c
1199   fib/fib_source.c
1200   fib/fib_urpf_list.c
1201   fib/fib_attached_export.c
1202   fib/fib_api.c
1203   fib/fib_bfd.c
1204 )
1205
1206 list(APPEND VNET_HEADERS
1207   fib/fib.h
1208   fib/fib_api.h
1209   fib/ip4_fib.h
1210   fib/ip6_fib.h
1211   fib/fib_types.h
1212   fib/fib_table.h
1213   fib/fib_node.h
1214   fib/fib_node_list.h
1215   fib/fib_entry.h
1216   fib/fib_entry_delegate.h
1217   fib/fib_sas.h
1218   fib/fib_source.h
1219 )
1220
1221 list(APPEND VNET_API_FILES fib/fib_types.api)
1222
1223 ##############################################################################
1224 # ADJ
1225 ##############################################################################
1226
1227 list(APPEND VNET_SOURCES
1228   adj/adj_nbr.c
1229   adj/adj_glean.c
1230   adj/adj_midchain.c
1231   adj/adj_midchain_delegate.c
1232   adj/adj_mcast.c
1233   adj/adj_l2.c
1234   adj/adj_nsh.c
1235   adj/adj.c
1236   adj/rewrite.c
1237   adj/adj_bfd.c
1238   adj/adj_delegate.c
1239 )
1240
1241 list(APPEND VNET_MULTIARCH_SOURCES
1242   adj/adj_nsh.c
1243   adj/adj_l2.c
1244   adj/adj_midchain.c
1245 )
1246
1247 list(APPEND VNET_HEADERS
1248   adj/adj.h
1249   adj/adj_types.h
1250   adj/adj_glean.h
1251   adj/adj_nsh.h
1252   adj/adj_nbr.h
1253   adj/adj_midchain.h
1254   adj/rewrite.h
1255 )
1256
1257 ##############################################################################
1258 # Data-Plane Objects
1259 ##############################################################################
1260
1261 list(APPEND VNET_SOURCES
1262   dpo/dpo.c
1263   dpo/drop_dpo.c
1264   dpo/ip_null_dpo.c
1265   dpo/ip6_ll_dpo.c
1266   dpo/punt_dpo.c
1267   dpo/receive_dpo.c
1268   dpo/load_balance.c
1269   dpo/load_balance_map.c
1270   dpo/lookup_dpo.c
1271   dpo/classify_dpo.c
1272   dpo/replicate_dpo.c
1273   dpo/interface_rx_dpo.c
1274   dpo/interface_tx_dpo.c
1275   dpo/mpls_disposition.c
1276   dpo/mpls_label_dpo.c
1277   dpo/l3_proxy_dpo.c
1278   dpo/dvr_dpo.c
1279   dpo/pw_cw.c
1280 )
1281
1282 list(APPEND VNET_MULTIARCH_SOURCES
1283   dpo/lookup_dpo.h
1284   dpo/mpls_disposition.c
1285   dpo/dvr_dpo.c
1286   dpo/mpls_label_dpo.c
1287   dpo/interface_rx_dpo.c
1288 )
1289
1290 list(APPEND VNET_HEADERS
1291   dpo/load_balance.h
1292   dpo/drop_dpo.h
1293   dpo/lookup_dpo.h
1294   dpo/punt_dpo.h
1295   dpo/classify_dpo.h
1296   dpo/receive_dpo.h
1297   dpo/ip_null_dpo.h
1298   dpo/replicate_dpo.h
1299   dpo/dpo.h
1300 )
1301
1302 ##############################################################################
1303 # Multicast FIB
1304 ##############################################################################
1305
1306 list(APPEND VNET_SOURCES
1307   mfib/mfib_forward.c
1308   mfib/ip4_mfib.c
1309   mfib/ip6_mfib.c
1310   mfib/mfib_api.c
1311   mfib/mfib_types.c
1312   mfib/mfib_signal.c
1313   mfib/mfib_itf.c
1314   mfib/mfib_entry.c
1315   mfib/mfib_entry.c
1316   mfib/mfib_entry_cover.c
1317   mfib/mfib_entry_delegate.c
1318   mfib/mfib_entry_src.c
1319   mfib/mfib_entry_src_rr.c
1320   mfib/mfib_table.c
1321 )
1322
1323 list(APPEND VNET_MULTIARCH_SOURCES
1324   mfib/mfib_forward.c
1325 )
1326
1327 list(APPEND VNET_HEADERS
1328   mfib/ip4_mfib.h
1329   mfib/mfib_types.h
1330   mfib/mfib_table.h
1331 )
1332
1333 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1334
1335 ##############################################################################
1336 # Utilities
1337 ##############################################################################
1338
1339 list(APPEND VNET_SOURCES
1340   util/radix.c
1341   util/refcount.c
1342   util/throttle.c
1343   util/trajectory.c
1344 )
1345
1346 list(APPEND VNET_HEADERS
1347   util/throttle.h
1348 )
1349
1350 ##############################################################################
1351 # QoS
1352 ##############################################################################
1353
1354 list(APPEND VNET_SOURCES
1355   qos/qos_types.c
1356   qos/qos_api.c
1357   qos/qos_egress_map.c
1358   qos/qos_record.c
1359   qos/qos_record_node.c
1360   qos/qos_store.c
1361   qos/qos_store_node.c
1362   qos/qos_mark.c
1363   qos/qos_mark_node.c
1364 )
1365
1366 list(APPEND VNET_MULTIARCH_SOURCES
1367   qos/qos_record_node.c
1368   qos/qos_mark_node.c
1369 )
1370
1371 list(APPEND VNET_API_FILES qos/qos.api)
1372
1373 ##############################################################################
1374 # BIER
1375 ##############################################################################
1376
1377 list(APPEND VNET_SOURCES
1378   bier/bier_bit_string.c
1379   bier/bier_entry.c
1380   bier/bier_fmask.c
1381   bier/bier_fmask_db.c
1382   bier/bier_input.c
1383   bier/bier_lookup.c
1384   bier/bier_output.c
1385   bier/bier_table.c
1386   bier/bier_types.c
1387   bier/bier_api.c
1388   bier/bier_drop.c
1389   bier/bier_update.c
1390   bier/bier_imp_node.c
1391   bier/bier_imp.c
1392   bier/bier_disp_entry.c
1393   bier/bier_disp_lookup_node.c
1394   bier/bier_disp_dispatch_node.c
1395   bier/bier_disp_table.c
1396   bier/bier_bift_table.c
1397 )
1398
1399 list(APPEND VNET_MULTIARCH_SOURCES
1400   bier/bier_disp_dispatch_node.c
1401   bier/bier_disp_lookup_node.c
1402   bier/bier_imp_node.c
1403 )
1404
1405 list(APPEND VNET_HEADERS
1406   bier/bier_types.h
1407   bier/bier_entry.h
1408   bier/bier_update.h
1409   bier/bier_table.h
1410 )
1411
1412 list(APPEND VNET_API_FILES bier/bier.api)
1413
1414 ##############################################################################
1415 # SYSLOG
1416 ##############################################################################
1417
1418 list (APPEND VNET_SOURCES
1419   syslog/syslog_api.c
1420   syslog/syslog_udp.c
1421   syslog/syslog.c
1422 )
1423
1424 list(APPEND VNET_HEADERS
1425   syslog/syslog_udp.h
1426   syslog/syslog.h
1427 )
1428
1429 list(APPEND VNET_API_FILES syslog/syslog.api)
1430
1431 ##############################################################################
1432 # Tunnel Endpoint Information Base
1433 ##############################################################################
1434
1435 list (APPEND VNET_SOURCES
1436   teib/teib_api.c
1437   teib/teib_cli.c
1438   teib/teib.c
1439 )
1440
1441 list(APPEND VNET_HEADERS
1442   teib/teib.h
1443 )
1444
1445 list(APPEND VNET_API_FILES teib/teib.api)
1446
1447 ##############################################################################
1448 # ARP/ND
1449 ##############################################################################
1450
1451 list (APPEND VNET_SOURCES
1452   arp/arp_api.c
1453   arp/arp.c
1454   arp/arp_proxy.c
1455 )
1456
1457 list(APPEND VNET_HEADERS
1458   arp/arp.h
1459 )
1460
1461 list(APPEND VNET_API_FILES arp/arp.api)
1462
1463 list (APPEND VNET_SOURCES
1464   ip6-nd/ip6_mld.c
1465   ip6-nd/ip6_nd.c
1466   ip6-nd/ip6_nd_api.c
1467   ip6-nd/ip6_nd_proxy.c
1468   ip6-nd/ip6_ra.c
1469   ip6-nd/rd_cp.c
1470   ip6-nd/rd_cp_api.c
1471 )
1472
1473 list(APPEND VNET_HEADERS
1474   ip6-nd/ip6_nd.h
1475 )
1476
1477 list(APPEND VNET_API_FILES
1478   ip6-nd/ip6_nd.api
1479   ip6-nd/rd_cp.api
1480 )
1481
1482 ##############################################################################
1483 # VNET Library
1484 ##############################################################################
1485
1486 add_vpp_library(vnet
1487   SOURCES ${VNET_SOURCES}
1488   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1489   INSTALL_HEADERS ${VNET_HEADERS}
1490   API_FILES ${VNET_API_FILES}
1491   LINK_LIBRARIES vppinfra svm vlib ${OPENSSL_LIBRARIES}
1492   DEPENDS vpp_version_h api_headers
1493 )
1494
1495 ##############################################################################
1496 # vpp api test client library
1497 ##############################################################################
1498
1499 add_vpp_library (vatclient
1500   SOURCES ip/ip_types_api.c
1501   DEPENDS api_headers
1502 )
1503
1504 ##############################################################################
1505 # VAT2 plugins
1506 ##############################################################################
1507 add_vpp_test_library(vnet
1508   ${VNET_API_FILES}
1509 )
1510
1511 ##############################################################################