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